take me home country roads 基于mysql的论坛(7)
程序员文章站
2024-01-12 11:15:58
...
# sendmsg.php
require "func.php";
if ($b1) {
if (is_user_exits($fromname) and check_user_password($fromname,$password)) {
sendmsg();
echo "成功!
}
?>
###############
# setup.php
# 此为初始化程序,只在上传后第一次执行,之后必须delete,以免出错
#################
require "func.php";
echo "
";
echo "建立数据库连接...ok!
";
echo "建立表 boardinfo...";
$sql="CREATE TABLE boardinfo (name varchar(50) NOT NULL, chinesename varchar(50) NOT NULL)";
mysql_query($sql) or die("错误");
echo "ok!
";
echo "建立表 user...";
$sql="CREATE TABLE user (id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL, sex varchar(6), realname varchar(20), password varchar(16) NOT NULL, address varchar(40), oicq varchar(10), homepage varchar(50), score int(11), phone varchar(20), email varchar(50), regtime varchar(20), qm text, slaveboard varchar(50), PRIMARY KEY (id))";
mysql_query($sql) or die("错误");
echo "ok!
";
echo "建立表 message... ";
$sql="create table message (id int(11) NOT NULL auto_increment, name varchar(50), fromname varchar(50), writetime varchar(20), cont longtext, PRIMARY KEY(id))";
mysql_query($sql) or die("错误");
echo "ok!
";
echo "初始化版面 “个人电脑”...";
create_board_table('computer','个人电脑');
echo "ok!
";
echo "
echo "
冷情疯子(电脑疯子)";
?>
## userinfo.php
用户信息
if (!isset($name)) {
?>
}
else {
require "func.php";
if (is_user_exits($name)) {
$sql="select * from user where name='$name'";
$sql_result=mysql_query($sql);
$row=mysql_fetch_array($sql_result);
?>
}
else {
echo "请输入正确合法存在的用户名称";
}
}
include "footer.php";?>
# viewmsg.php
require "func.php";
if (is_user_exits($jl_forum[name]) and check_user_password($jl_forum[name],$jl_forum[password])) {
if (isset($job)) {
if (is_this_user($id)) {
delmsg($id);
}
}
$name=$jl_forum[name];
$sql="select * from message where name='$name'";
$sql_result=mysql_query($sql);
$sum=mysql_num_rows($sql_result);
?>
察看留言
}
else {
show_error(4);
}
?>
require "func.php";
if ($b1) {
if (is_user_exits($fromname) and check_user_password($fromname,$password)) {
sendmsg();
echo "成功!
}
?>
###############
# setup.php
# 此为初始化程序,只在上传后第一次执行,之后必须delete,以免出错
#################
require "func.php";
echo "
初始化数据库
";
echo "建立数据库连接...ok!
";
echo "建立表 boardinfo...";
$sql="CREATE TABLE boardinfo (name varchar(50) NOT NULL, chinesename varchar(50) NOT NULL)";
mysql_query($sql) or die("错误");
echo "ok!
";
echo "建立表 user...";
$sql="CREATE TABLE user (id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL, sex varchar(6), realname varchar(20), password varchar(16) NOT NULL, address varchar(40), oicq varchar(10), homepage varchar(50), score int(11), phone varchar(20), email varchar(50), regtime varchar(20), qm text, slaveboard varchar(50), PRIMARY KEY (id))";
mysql_query($sql) or die("错误");
echo "ok!
";
echo "建立表 message... ";
$sql="create table message (id int(11) NOT NULL auto_increment, name varchar(50), fromname varchar(50), writetime varchar(20), cont longtext, PRIMARY KEY(id))";
mysql_query($sql) or die("错误");
echo "ok!
";
echo "初始化版面 “个人电脑”...";
create_board_table('computer','个人电脑');
echo "ok!
";
echo "
设置完毕!
";echo "
冷情疯子(电脑疯子)";
?>
## userinfo.php
if (!isset($name)) {
?>
}
else {
require "func.php";
if (is_user_exits($name)) {
$sql="select * from user where name='$name'";
$sql_result=mysql_query($sql);
$row=mysql_fetch_array($sql_result);
?>
详细资料 |
用户名: |
真实姓名: |
性别: |
地址: |
电话: |
OICQ: |
Email: |
主页: |
注册时间: |
目前积分: |
}
else {
echo "请输入正确合法存在的用户名称";
}
}
include "footer.php";?>
# viewmsg.php
require "func.php";
if (is_user_exits($jl_forum[name]) and check_user_password($jl_forum[name],$jl_forum[password])) {
if (isset($job)) {
if (is_this_user($id)) {
delmsg($id);
}
}
$name=$jl_forum[name];
$sql="select * from message where name='$name'";
$sql_result=mysql_query($sql);
$sum=mysql_num_rows($sql_result);
?>
您目前共有 条留言
于 ">删除 |
}
else {
show_error(4);
}
?>
以上就介绍了take me home country roads 基于mysql的论坛(7),包括了take me home country roads方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
推荐阅读
-
take me home country roads 基于mysql的论坛(7)
-
take me home country roads 图解MYSQL的安装和数据升级第1/2页
-
take me home country roads 基于mysql的论坛(7)
-
take me home country roads mysql时区问题
-
take me home country roads mysql时区问题
-
take me home country roads 从Web查询数据库之PHP与MySQL篇
-
take me home country roads PHP+MYSQL 出现乱码的解决方法
-
take me home country roads 从Web查询数据库之PHP与MySQL篇
-
take me home country roads PHP+MYSQL 出现乱码的解决方法