# sendmsg.php
require "func.php";
if ($b1) {
if (is_user_exits($fromname) and check_user_password($fromname,$password)) {
sendmsg();
echo "成功!
";
}
else {
$founderr=1;
echo "用户名/密码错误!";
}
}
else {
?>
发送留言 }
?>
###############
# 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:"> |
主页:" target="_blank"> |
注册时间: |
目前积分: |
}
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);
?>
察看留言 您目前共有 条留言
while ($sql_row=mysql_fetch_array($sql_result)) {
?>
')"> 于 ">删除 |
|
|
}
?>
}
else {
show_error(4);
}
?>
http://www.bkjia.com/PHPjc/316382.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/316382.htmlTechArticle# sendmsg.php ?php require func.php; if ($b1) { if (is_user_exits($fromname) and check_user_password($fromname,$password)) { sendmsg(); echo 成功!brform method=POSTinput type=bu...