基于mysql的论坛(2)

################################# ##
apply.php ####################
################################# html
head title注册顾客/title meta content=text/html; charset=gb2312 link
rel=stylesheet type=text/css href=css/index.css /head body
bgcolor=#FFFFFF background=image/bg.gif ?php include header.php;? br hr
noshade width=97% size=1 div align=center注册新客户br /div table
width=十分八 border=1 cellspacing=0 cellpadding=0 bordercolorlight=#336699
bordercolordark=#FFFFFF align=center tr td colspan=2 div align=center
textarea name=temp wrap=VIRTUAL cols=60 rows=8报了名须知:
用户独有注册之后,本事有权发新贴子和还原贴子。非注册客商只能察看贴子。
注册类型中,带“*”的是你必得填写的种类,其余是可选项目。可是,为了联络方便,最佳将材质写的详尽一些。
本论坛不款待有关政治敏感话题,借使经过引起纠纷,本论坛使用途理者不辜负权利。
在注册之后,每发一篇贴子,扩充5点积分,回复一篇,扩大3点,被去除一篇,扣除4点。积分只是为着活跃论坛气氛,不意味着网络基友的某方面水平。
制作:冷情疯子/textarea /div /td /tr tr valign=top td colspan=2 /td /tr
tr td colspan=2 form method=post action=adduser.php table width=十分七border=0 cellspacing=0 cellpadding=3 align=center tr td
align=right客户名/td td input type=text name=name maxlength=16
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 * /td /tr tr td align=right密码/td td input
type=password name=pwd1 maxlength=8 style=font-size: 9pt;
background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000
size=9 * /td /tr tr td align=right重复密码/td td input type=password
name=pwd2 maxlength=8 style=font-size: 9pt; background-color: #FFFFFF;
color: #FF0000; border: 1 solid #000000 size=9 * /td /tr tr td
align=rightEmail/td td input type=text name=email style=font-size: 9pt;
background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000
/td /tr tr td align=right性别/td td select name=sex option value=秘密
selected秘密/option option value=男男/option option value=女女/option
/select /td /tr tr td align=right真实性名/td td input type=text
name=realname size=17 maxlength=16 style=font-size: 9pt;
background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000
/td /tr tr td align=right地址/td td input type=text name=address
maxlength=40 size=30 style=font-size: 9pt; background-color: #FFFFFF;
color: #FF0000; border: 1 solid #000000 /td /tr tr td
align=right电话/td td input type=text name=phone size=22 maxlength=20
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 /td /tr tr td align=right主页/td td input
type=text name=homepage style=font-size: 9pt; background-color:
#FFFFFF; color: #FF0000; border: 1 solid #000000 size=50 value= /td
/tr tr td align=rightOICQ/td td input type=text name=oicq maxlength=11
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 size=12 /td /tr tr td align=right签名/td td
textarea name=qm wrap=VIRTUAL cols=50/textarea /td /tr tr td align=right
/td td align=center input type=submit name=b1 value=注册 input
type=reset name=Submit2 value=清除 /td /tr /table /form /td /tr /table
br ?php include footer.php;? /body /html
##########################################
## chklogin.php #########################
########################################
?php require (func.php); $name=trim($name); $password=trim($password);
$sql=select * from user where name=’$name’;
$sql_result=mysql_query($sql);
$sql_row=mysql_fetch_澳门新浦京8455com,array($sql_result); if
(($password==$sql_row[password])and(!empty($sql_row[slaveboard]))){
setcookie(jl_forum[board],$sql_row[slaveboard]);
setcookie(jl_forum[name],$name);
setcookie(jl_forum[password],$password); redirect2(manage_list.php);
} else { show_error(4); } ?
###################################
#####config.inc.php ##########
############################# ?
$MYSQL_HOSTNAME = localhost; $MYSQL_USERNAME = root; $MYSQL_PASSWORD
= ; $DATABASE = forum; $pagesize=25; $copyright=Copyright 2000, by
Edincur, All Rights ReservedBR; $admin_email=your_email;
$admin_name=your_admin_name;#论坛管理员名称
$admin_password=your_password;#论坛管理员密码
$remove_score=4;#被剔除一篇扣除的分数
$new_topic_score=5;#刊登新主题的分数
$re_topic_score=3;#复原一篇的分数 mysql_connect($MYSQL_HOSTNAME,
$MYSQL_USERNAME, $MYSQL_PASSWORD); mysql_select_db($DATABASE) or
die(mysql_error()); ?
############################### #

## manage_read.php ?php require (func.php); if
(check_admin_password()) { $board=$jl_forum[board]; switch ($job){
case setgood: set_good($jl_forum[board],$uid); $work=1; break; case
setnogood: set_no_good($jl_forum[board],$uid); $work=1; break; case
delete: del_doc($jl_forum[board],$uid); $work=1; break; } if
(!$word) { add_one_hit($board,$id); } $sql=select * from $board where
id=$id; $sql_result=mysql_query($sql);
$sum=mysql_num_rows($sql_result);
$sql_row=mysql_fetch_array($sql_result); $title=$sql_row[title];
$writer=$sql_row[writer]; $cont=$sql_row[cont];
$writetime=$sql_row[writetime]; $hits=$sql_row[hits];
$good=$sql_row[good]; $rootid=$sql_row[id];
$fromip=$sql_row[fromip]; $sql=select * from $board where
slaveid=$id; $sql_result=mysql_query($sql); if ($sum0) { ? html head
title?php echo $title;?/title meta content=text/html; charset=gb2312
link rel=stylesheet type=text/css href=css/index.css script
language=javascript function
sendmsg(name){window.open(sendmsg.php?name=+name,,height=200,width=500,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no);
} /script /head body bgcolor=#666699 ?php include ad.php;?br hr noshade
width=98% size=1 table width=98% border=1 cellspacing=0 cellpadding=2
align=center bordercolorlight=#CCCCCC bordercolordark=#FFFFFF tr
bgcolor=#666666 tdfont color=#FFcc00b标题:?php echo $title;? font
color=#FFFFCC◎操作:/font/b/fontb?php echo a
href=$php_self?job=setgood&uid=$id&id=$rootid;?font
color=#FFFFFF转进精髓区/font/a/bfont color=#FFcc00b /b/fontb?php echo
a href=$php_self?job=delete&uid=$id&id=$rootid;?font
color=#FFFFFF删除/font/a/bfont color=#FFcc00b?php if ($good==y){ ?
/b/fontb?php echo a
href=$php_self?job=setnogood&uid=$id&id=$rootid;?font
color=#FFFFFF转出精粹区/font/a/bfont color=#FFcc00b?php } ? /b/font/td
/tr tr td bgcolor=#eeeeee小编:?php echo $writer;?(?php echo
$writetime;?,点击:?php echo $hits;?卡塔尔国 a href=javascript:sendmsg(‘?php
echo $writer;?’卡塔尔img src=image/icon1.gif width=18 height=17
alt=给作者留言 border=0/a a href=userinfo.php?name=?php echo
$writer;?img src=image/profile.gif width=16 height=16 alt=察看顾客资料
border=0/a/td /tr tr td bgcolor=#ffffef?php echo $cont;?/td /tr tr
bgcolor=#e8eee0 td※ 来源:?php echo $jl_forum[chinesename];?
[◆FROM:?php echo $fromip;?]/td /tr /table br ?php if (!$add){
while($sql_row=mysql_fetch_array($sql_result)) {
$good=$sql_row[good]; ? table width=98% border=1 cellspacing=0
cellpadding=2 align=center bordercolorlight=#CCCCCC
bordercolordark=#FFFFFF tr bgcolor=#015C71 tdfont
color=#ffffff标题:?php echo $sql_row[title]; $id=$sql_row[id]; ?
font color=#FFFFCC◎操作:/font/b/fontb?php echo a
href=$php_self?job=setgood&uid=$id&id=$rootid;?font
color=#FFFFFF转进精髓区/font/a/bfont color=#FFcc00b /b/fontb?php echo
a href=$php_self?job=delete&uid=$id&id=$rootid;?font
color=#FFFFFF删除/font/a/bfont color=#FFcc00b?php if ($good==y){ ?
/b/fontb?php echo a
href=$php_self?job=setnogood&uid=$id&id=$rootid;?font
color=#FFFFFF转出精粹区/font/a/bfont color=#FFcc00b?php } ? /b/font/td
/tr tr bgcolor=#eeeeee td作者:?php echo $sql_row[writer];?(?php
echo $sql_row[writetime];?) a href=javascript:sendmsg(‘?php echo
$sql_row[writer];?’卡塔尔(قطر‎img src=image/icon1.gif width=18 height=17
alt=给笔者留言 border=0/a a href=userinfo.php?name=?php echo
$sql_row[writer];?img src=image/profile.gif width=17 height=16
alt=察看客户资料 border=0/a/td /tr tr td bgcolor=#ffffef?php echo
$sql_row[cont];?/td /tr tr bgcolor=#e8eee0 td※ 来源:?php echo
$jl_forum[chinesename];? [◆FROM:?php echo
$sql_row[fromip];?]/td /tr /table ?php } } ? br ?php
includefooter.php;?br /body /html ?php } else { echo 此条纪录已经被剔除;
} } else { show_error(1); } ? ## modify.php ?php require func.php; if
(check_user_password($jl_forum[name],$jl_forum[password])) {
$name=$jl_forum[name]; $password=$jl_forum[password]; $sql=select
* from user where name=’$name’; $sql_result=mysql_query($sql);
$sql_row=mysql_fetch_array($sql_resultState of Qatar; ? html head
title改正材质/title meta content=text/html; charset=gb2312 link
rel=stylesheet type=text/css href=css/index.css /head body
bgcolor=#FFFFFF background=image/bg.gif ?php include header.php;?br hr
noshade width=97% size=1 div align=center校订客商个人资料br table
width=十分之七 border=1 cellspacing=0 cellpadding=0 bordercolorlight=#336699
bordercolordark=#FFFFFF tr valign=toptd colspan=2 /td /tr trtd
colspan=2form method=post action=change.php table width=80% border=0
cellspacing=0 cellpadding=3 align=center trtd align=right用户名/td
td?php echo $name;?/td /tr trtd align=right密码/td tdinput type=password
name=pwd1 maxlength=8 style=font-size: 9pt; background-color: #FFFFFF;
color: #FF0000; border: 1 solid #000000 size=9 value=?php echo
$password;? * /td /tr trtd align=right重复密码/td tdinput type=password
name=pwd2 maxlength=8 style=font-size: 9pt; background-color: #FFFFFF;
color: #FF0000; border: 1 solid #000000 size=9 value=?php echo
$password;? * /td /tr trtd align=rightEmail/td tdinput type=text
name=email style=font-size: 9pt; background-color: #FFFFFF; color:
#FF0000; border: 1 solid #000000 value=?php echo $sql_row[email];?
* /td /tr trtd align=right性别/td tdselect name=sex option value=秘密
selected秘密/option option value=男男/option option value=女女/option
/select /td /tr trtd align=right真实性名/td tdinput type=text
name=realname size=17 maxlength=16 style=font-size: 9pt;
background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000
value=?php echo $sql_row[realname];? /td /tr trtd align=right地址/td
tdinput type=text name=address maxlength=40 size=30 style=font-size:
9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid
#000000 value=?php echo $sql_row[address];? /td /tr trtd
align=right电话/td tdinput type=text name=phone size=22 maxlength=20
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 value=?php echo $sql_row[phone];? /td /tr
trtd align=right主页/td tdinput type=text name=homepage style=font-size:
9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid
#000000 size=50 value=?php echo $sql_row[homepage];? /td /tr trtd
align=rightOICQ/td tdinput type=text name=oicq maxlength=11
style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000;
border: 1 solid #000000 size=12 value=?php echo $sql_row[oicq];? /td
/tr trtd align=right签名/td td?php echo $sql_row[qm]br;?textarea
name=qm wrap=VIRTUAL cols=50/textarea /td /tr trtd align=right /td td
align=centerinput type=submit name=b2 value=修改 input type=reset
name=Submit2 value=清除 /td /tr /table /form /td /tr /table div
align=centerbr /div /div ?php include footer.php;? /body /html ?php }
else { show_error(4); } ? ## modify_l.php ?php require func.php; if
($b1) { if (is_user_exits($name) and
check_user_password($name,$password)) { setcookie
(jl_forum[name],$name); setcookie (jl_forum[password],$password);
redirect2(modify.php); } else { show_error(4); } } else { ? html head
titlemain/title meta content=text/html; charset=gb2312 link
rel=stylesheet type=text/css href=css/page.css /head body
bgcolor=#FFFFFF background=image/bg.gif table width=90% border=1
cellspacing=0 cellpadding=0 align=center bordercolorlight=#FFCC99
bordercolordark=#FFCC99 tr bgcolor=#CCFF99td div
align=centerb修正材料登录/b/div /td /tr tr align=centertd form
method=post action=modify_l.php table width=70% border=0 cellspacing=0
cellpadding=0 tr td width=38% align=right用户名:/td td width=62%
align=left input type=text name=name size=17 maxlength=16 /td /tr tr td
width=38% align=right密码:/td td width=62% align=left input
type=password name=password size=17 maxlength=16 /td /tr /table input
type=submit name=b1 value=进入 /form /td /tr tr bgcolor=#CCFF99td div
align=centerb论坛消息/b/div /td /tr tr valign=toptd ?php include
info.php;? /td /tr /table /body /html ?php } ? ## oper.php ?php
require func.php; if (adminok()) { if (isset($add_board)) { if
(isset($name) and isset($chinesename) and !is_board_exits($name)) {
create_board_table($name,$chinesename卡塔尔国; } else { echo
现身错误!(可能版面已经存在); $founderr=1; } } elseif
(isset($del_board)) { if (isset($board)) { drop_board_table($board卡塔尔国;
} else { echo 现身谬误!(请选拔要删减的版面卡塔尔国; $founderr=1; } } elseif
(isset($modify卡塔尔国卡塔尔国 { if (isset($nameState of Qatar and isset($chinesename卡塔尔卡塔尔(قطر‎ {
update_board($name,$chinesename卡塔尔国; } else { echo 现身错误!(请填入完整卡塔尔国;
$founderr=1; } } elseif (isset($add_admin)) { if
(is_user_exits($name) and isset($board)) { add_admin($board,$name卡塔尔(قطر‎; }
else { echo 现身谬误!(极有非常的大大概是客商海市蜃楼卡塔尔(قطر‎; $founderr=1; } } elseif
(isset($delete_admin)) { if (is_user_exits($name)) {
del_admin($name卡塔尔; } else { echo 现身错误!(极有十分大或然是顾客空头支票State of Qatar;
$founderr=1; } } else { echo 你要怎么?; $founderr=1; } if
(!$founderr) { redirect2(admin.php); } } else { show_error(1); } ?

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图