用户的详细注册和判断
分类:博客热点

有三个文件: 第一是:zcyh.php?include("header1.inc.php")? div align=center table width="89%" border="0" tr tdfont color="#ff0000"当前位置:a href="index.php"主页/agt;gt;注册页面/font/td /tr /tablebr table width="82%" border="0" height="27" tr td height="14"bfont color="#660099"img src="images/dyb.gif" width="68" height="22" 请设定用户名:/font/b/td /tr /table form name="form1" method="post" action="register.php" table width="80%" border="0" height="154" tr td width="42%" div align="right"font color="#0000FF"用户名:/font /td td width="58%" input type="text" name="name" maxlength="20" /td/div /tr tr td colspan="2" height="27" div align="left"font size="2"font color="#FF0000"注意:/fontfont color="#0000FF"用户名只能由英文字母,数字和下划线构成,不能有空格,且必须以英文字母为开头。 /font/font /div /td /tr tr td colspan="2" height="14" div align="left"font size="2"font color="#FF0000"例如:/font/font/div /td /tr tr td colspan="2" div align="center"font size="2" color="#FF0000"bfont color="#0000FF"√/font/b正确的例子:jocky、lin_xing、nh2001/font/div /td /tr tr td colspan="2" div align="center"font size="2" color="#FF0000"bfont color="#0000FF"×/font/b错误的例子:li kitty、ming:)、168kk/font/div /td /tr tr td colspan="2" height="18" div align="center"font size="2" color="#0000FF"如果你已经填写好,请点“/fontfont size="2"font color="#FF0000"下一步/fontfont color="#0000FF"”按钮; 点“/fontfont color="#FF0000"取消/fontfont color="#0000FF"”按钮即取消您刚才的输入,重新开始。/font /font/div /td /tr tr td colspan="2" height="19" div align="center" input type=image name=name2 src="images/xyb.gif" width="68" height="22" border="0" input type=hidden name=name3 value=?echo$name? a href="zcyh.php"img src="images/cancel.gif" width="68" height="22" border="0"/a/div /td /tr /table /form br /div br ?include("foot.inc.php")? /body /html 第二个是:register.php(判断注册用户名是否正确和是否重复,然后输出注册的详细表单) ?include("header1.inc.php")? div align=center table width="89%" border="0" tr tdfont color="#ff0000"当前位置:a href="index.php"主页/agt;gt;a href=zcyh.php注册页面/agt;gt;详细资料/font/td /tr /tablebr ? if($name==""){ echo"brcenterfont color=blue用户名不能为空。请/fonta href=zcyh.php返回/a/centerbr"; include("foot.inc.php"); exit(); } if(strlen($name)3 || strlen($name)15){ echo"brcenterfont color=blue用户名的长度不符合要求。请/fonta href=zcyh.php返回/a/centerbr"; include("foot.inc.php"); exit(); } if (!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*$", $name)) { echo"brcenterfont color=blue注册名只能由字母数字组成.请/fonta href=zcyh.php返回/a/centerbr"; include("foot.inc.php"); exit(); } if ($name) { $conn=@mysql_connect("localhost"); $sql=@mysql_select_db("jocky",$conn); $result=@mysql_query("select * from user1 where name=$name" ,$conn); if($result){ if(@mysql_fetch_object($result)){ echo"brcenterfont color=blue对不起,已经有相同的用户名!请/fonta href=zcyh.php返回/a./centerbr";} else{$conn=@mysql_connect("localhost"); $sql=@mysql_select_db("jocky",$conn); $sqldo="insert into user1 (name) values ($name)"; @mysql_query($sqldo,$conn); echo"brcenterfont color=blue你好,/font"; echo"font color=redb$name/b/font/center"; include("zhuce.php"); @mysql_close($conn);} include("foot.inc.php"); exit(); } } ? /div ?include("foot.inc.php")? /body /html 第三个是:check.php(判断注册资料是否正确,然后插入数据库,重新登录) ?include("header1.inc.php")? div align=center table width="89%" border="0" tr tdfont color="#ff0000"当前位置:a href="index.php"主页/agt;gt;a href=zcyh.php注册页面/agt;gt;详细资料/font/td /tr /tablebr ? if($truename==""){ echo"brcenterfont color=blue真实姓名不能为空。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($password==""||$repassword==""){ echo"brcenterfont color=blue密码不能为空。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($repassword威尼斯正规官网,!=$password){ echo"brcenterfont color=blue两次输入的密码不一样。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if(strlen($password)6 || strlen($password)15){ echo"brcenterfont color=blue密码的长度不符合要求。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($pwwhat==""){ echo"brcenterfont color=blue密码提示问题不能为空。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($pwan==""){ echo"brcenterfont color=blue密码提示答案不能为空。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($personalid==""){ echo"brcenterfont color=blue身份证号码不能为空。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if(strlen($personalid)!=15 or strlen($personalid)!=18){ echo"brcenterfont color=blue输入的身份证号码不是15位或18位。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); }*/ if($year=="" || $month=="" || $day==""){ echo"brcenterfont color=blue出生年月日没有填。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if(strlen($year)!=4 || strlen($month)!=2 || strlen($day)!=2){ echo"brcenterfont color=blue输入的年月日不正确。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if (!eregi("^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,3}$",$email)) { echo"brcenterfont color=blueE-Mail地址格式不对。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($tel==""){ echo"brcenterfont color=blue联系的电话不能为空。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if(strlen($tel)!=11 || strlen($tel)!=12 || strlen($tel)!=13){ echo"brcenterfont color=blue联系的电话长度不正确。请/fonta href=javascript:history.go(-1);返回/a/centerbr"; include("foot.inc.php"); exit(); } if($gender==""){ $null1="空";} if($xueli==""){ $null2="空";} if($money==""){ $null3="空";} if($addr==""){ $null4="空";} $birthday="$year.-.$month.-.$day"; $time=time(); $conn=@mysql_connect("localhost"); $sql=@mysql_select_db("jocky",$conn); $result=@mysql_query("select * from user1 where name=$name" ,$conn); $sqldo="insert into user1 (name,truename,password,pwwhat,pwan,personalid,gender,xueli,birth,email,tel,money,addr,time) values($name,$truename,$password,$pwwhat,$pwan,$personalid,$null1,$null2,"; $sqldo.="$birthday,$email,$tel,$null3,$null4,$time)"; $query=@mysql_query($sqldo,$conn); if($query){ echo"brcenterfont color=blue恭喜你,你已注册成功!请/fonta href=index.php登录/a/centerbr"; exit(); }else{ echo"brcenterfont color=blue服务器忙,不能为你注册,请稍后再注册!/fonta href=index.php回主页/a/centerbr"; } @mysql_close($conn); ? /div ?include("foot.inc.php")? /body /html

## 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_result); ? 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=90% 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($name) 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 出现错误!(极有可能是用户不存在); $founderr=1; } } else { echo 你要干什么?; $founderr=1; } if (!$founderr) { redirect2(admin.php); } } else { show_error(1); } ?

# post.php ?php require(config.inc.php); $sql=select * from boardinfo where name='$board'; $sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); ? html head title发新贴子/title link rel=stylesheet type=text/css href=css/index.css /head body bgcolor=#666666 ?php include ad.php;?br hr noshade width=80% size=1 table width=80% border=1 cellspacing=0 cellpadding=0 align=center bordercolorlight=#686898 bordercolordark=#FFFFFF tr align=center valign=top bgcolor=#666699tdfont size=3 color=#336699bfont color=#CCFFFF发 贴 子/font/b/fontbr /td /tr tr bgcolor=#ffffeftd/td /tr tr bgcolor=#e8eee0tdbr 您的贴子将被发表在b?php echo $sql_row[chinesename];?/b版块 /td /tr /table br form method=post action=read.php table width=98% border=1 cellspacing=0 cellpadding=0 align=center bordercolorlight=#336699 bordercolordark=#FFFFFF bgcolor=#666699 trtd width=89 bgcolor=#acc0fa align=right用户名:/td td width=224input type=text name=name style=font-size: 9pt; background-color: #FFFFFF; color: #3366FF; border: 1 solid #000000 value=?php echo $jl_forum[name];? size=17 maxlength=16 font color=#FF0000* /font /td td width=63 bgcolor=#acc0fa align=right密码:/td td width=160input type=password name=password size=10 maxlength=16 style=font-size: 9pt; background-color: #FFFFFF; color: #FF0000; border: 1 solid #000000 font color=#FF0000*/font font color=#FF0000 /font /td /tr trtd colspan=4font color=#FFFFFF主题:/fontinput type=text name=title size=50 maxlength=50 style=font-size: 9pt; background-color: #FFFFFF; color: ##3366FF; border: 1 solid #000000 font color=#FF0000* /font/td /tr trtd colspan=4 font color=#FFFFFF内容:/fontbr textarea name=cont cols=70 rows=12 wrap=VIRTUAL/textarea br input type=button name=Submit2 value=取消 onclick=window.close() input type=submit name=add value=提交 input type=checkbox name=qm value=qm checked font color=#FFFFFF使用签名/fontinput type=hidden name=board value=?php echo $board;? /td /tr /table /form ?php include footer.php;?br /body /html # query.php ?php require(func.php); $sql=select * from boardinfo; $sql_result=mysql_query($sql); ? 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=query_list.php 在select name=board option selected请选择版面/option ?php while($sql_row=mysql_fetch_array($sql_result)){ ?option value=?php echo $sql_row[name];??php echo $sql_row[chinesename];?/option ?php } ? /select 中查询br input type=text name=query_str size=40 maxlength=40 br input type=submit name=title value=按主题查询 input type=submit name=cont value=按内容查询 input type=submit name=writer value=按作者查询 /form /td /tr tr bgcolor=#CCFF99td div align=centerb论坛信息/b/div /td /tr tr td ?php include info.php;? /td /tr /table /body /html # query_list.php ?php require(func.php); if (!empty($query_str)) { if(!is_board_exits($board)){ $board=computer; } if ($title){ $submit=title; } elseif ($cont) { $submit=cont; } elseif ($writer) { $submit=writer; } else { $submit=title; } $sql=select * from $board where ($submit like '%$query_str%'); $temp=mysql_query($sql); $sum=mysql_num_rows($temp); if ($sum!=0) { $sql=select * from boardinfo where name='$board'; $sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); $chinesename=$sql_row[chinesename]; setcookie (jl_forum[chinesename],$chinesename); $sql=select name from user where slaveboard='$board'; $sql_result=mysql_query($sql); ? html head titleList/title meta content=text/html; charset=gb2312 link rel=stylesheet type=text/css href=css/index.css script language=javascript function openwin(board,id){window.open(good_read.php?board=+board+&id=+id,,height=460,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no); } function post(board){window.open(post.php?board=+board,,height=500,width=600,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no); } /script /head body bgcolor=#FFFFFF background=image/bg.gif ?php include header.php;? br table width=100% border=1 cellspacing=0 cellpadding=0 bordercolorlight=#000000 bordercolordark=#FFFFFF tr td height=20 width=22% bgcolor=#E8E8E8版面:?php echo $chinesename; ?/td td height=20 width=29% bgcolor=#E8E8E8版主:?php while ($sql_row=mysql_fetch_array($sql_result)) { echo $sql_row[name].; } # 选择出留言纪录; $totalpage=ceil($sum/$pagesize); # 分页 if($page1 or empty($page)){ $page=1; } elseif ($page$totalpage){ $page=$totalpage; } elseif ($totalpage==0) { $page=0; } $offset=($page-1)*$pagesize; $sql=select * from $board where ($submit like '%$query_str%') order by id desc limit $offset,$pagesize; $sql_result=mysql_query($sql); ? /td td height=20 width=17% bgcolor=#E8E8E8查询到?php echo $sum; ?条纪录/td td height=20 colspan=2 width=32%a href='javascript:post(?php echo $board;?)'img src=image/newtopic.jpg width=92 height=21 border=0 alt=发新贴子/a/td /tr /table br table width=100% border=1 cellspacing=0 cellpadding=1 bordercolorlight=#CCCCCC bordercolordark=#eeeeee tr bgcolor=#995100 align=center td width=6%font color=#FFFFFF回应/font/td td width=67% bgcolor=#995100font color=#FFFFFF主 题/font/td td width=20%font color=#FFFFFF时 间/font/td td width=7%font color=#FFFFFF人气/font/td /tr tr bgcolor=#FFCC99 td colspan=5 height=2/td /tr ?php while ($sql_row=mysql_fetch_array($sql_result)) { echotr; echotd width=6% bgcolor=#E8E8E8 align=center; echo [*]; echo/td; echotd bgcolor=#E8FDEE width=56%font face=宋体a href='javascript:openwin($board,$sql_row[id])' title=作者:$sql_row[writer] 大小:$sql_row[size]字节$sql_row[title]/a/font/td; echotd width=18% bgcolor=#FFF5DD align=center$sql_row[writetime]/td; echotd width=6% bgcolor=#E8FDEE align=center$sql_row[hits]/td; echo/tr; } ? tr bgcolor=#FFCC99 td colspan=5 align=center height=2/td /tr /table div align=right form method=post action=?php echo $php_self;? input type=hidden name=?php echo $submit;? value=y input type=hidden name=query_str value=?php echo $query_str;? 共b?php echo $totalpage;?/b页 第b?php echo $page;?/b页・?php if ($page!=1){ $back=$page-1; echoa href=$php_self?board=$board&page=1&$submit=y&query_str=$query_str首页/a a href=$php_self?board=$board&page=$back&$submit=y&query_str=$query_str/a; } if ($page==1){ echo首页 ; } if($page!=$totalpage){ $next=$page+1; echo a href=$php_self?board=$board&page=$next&$submit=y&query_str=$query_str/a a href=$php_self?board=$board&page=$totalpage&$submit=y&query_str=$query_str尾页/a; } if($page==$totalpage){ echo 尾页; } ?・转到input type=submit name=goto value=转到 input type=text name=page size=2 页/form /div ?php include footer.php;? /body /html ?php } else { show_error(10); } } else { show_error(9); } # read.php ?php require (func.php); if ($re){ $sql=select slaveid from $board where id=$id; $sql_result=mysql_query($sql); $sql_row=mysql_fetch_array($sql_result); if($sql_row[slaveid]!=0){ show_error(1); $founderr=1; } if (!check_user_password($name,$password)){ show_error(4); $founderr=1; } if (empty($title)){ show_error(2); $founderr=1; } if ($qm){ $qm=expl_qm($name); } if(!$founderr){ re_doc($board,$id); setcookie (jl_forum[name],$name); $sql=select * from $board where id=$id; $sql_result=mysql_query($sql); $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]; $fromip=$sql_row[fromip]; $sql=select * from $board where slaveid=$id; $sql_result=mysql_query($sql); # $sql_row=mysql_fetch_array($sql_result); } } elseif ($add){ if (!is_board_exits($board)){ show_error(7); $founderr=1; } if (empty($title)){ show_error(2); $founderr=1; } if (!check_user_password($name,$password)){ show_error(4); $founderr=1; } if ($qm){ $qm=expl_qm($name); } if (!$founderr){ add_doc($board); $add=1; setcookie (jl_forum[name],$name); } } else { if (!is_board_exits){ show_error(7); } add_one_hit($board,$id); $sql=select * from $board where id=$id; $sql_result=mysql_query($sql); $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]; $fromip=$sql_row[fromip]; $sql=select * from $board where slaveid=$id; $sql_result=mysql_query($sql); #$sql_row=mysql_fetch_array($sql_result); } ? 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;?/b/font/td /tr tr td bgcolor=#eeeeee作者:?php echo $writer;?(?php echo $writetime;?) 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=15 alt=察看用户资料 border=0/a/td /tr tr bgcolor=#ffffeftd?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!=1){ while($sql_row=mysql_fetch_array($sql_result)) { ? 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];?/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=15 alt=察看用户资料 border=0/a/td /tr tr bgcolor=#ffffeftd?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 } ? form method=post action=read.php table width=98% border=0 cellspacing=0 cellpadding=0 align=center tr td table width=40 border=1 cellspacing=0 cellpadding=0 height=20 bordercolorlight=#000099 bordercolordark=#FFFFFF tr valign=middle align=center bgcolor=#acc0fa td height=17回复/td /tr /table /td /tr /table table width=98% border=1 cellspacing=0 cellpadding=0 align=center bordercolorlight=#686898 bordercolordark=#CCCCCC tr td width=8% align=right bgcolor=#acc0fa用户名/td td width=33% input type=text name=name size=17 maxlength=16 value=?php echo $jl_forum[name];? font color=#FFFFFF* /font/td td width=7% bgcolor=#acc0fa align=center密码/td td width=52% input type=password name=password size=17 maxlength=16 font color=#FFFFFF* /font/td /tr tr td width=8% align=right bgcolor=#acc0fa标题:/td td colspan=3 input type=text name=title size=40 maxlength=50 font color=#FFFFFF * /font/td /tr tr td width=8% align=right bgcolor=#acc0fa内容:/td td colspan=3 textarea name=cont cols=60 rows=3 wrap=VIRTUAL/textarea /td /tr tr td width=8% align=right bgcolor=#acc0fa/td td colspan=3 input type=button name=clear value=关闭窗口 onclick=window.close() input type=submit name=re value=提交 input type=checkbox name=qm value=qm checked font color=#FFFFFF使用签名 input type=hidden name=board value=?php echo $board;? input type=hidden name=id value=?php echo $id;? /font/td /tr /table ?php } ? br /form ?php includefooter.php;?br /body /html

本文由威尼斯在线注册平台发布于博客热点,转载请注明出处:用户的详细注册和判断

上一篇:没有了 下一篇:下面讲的是用php生成静态html页面方法哦,利用模板
猜你喜欢
热门排行
精彩图文