澳门新浦京8455com我的论坛源代码(四)

POST.PHP发布主题的页面,发布的信息提交到OKEY.PHP中去处理。 html head
title论坛发帖/title meta content=text/html; charset=gb2312 STYLE
type=text/css P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt} /STYLE ?
include linkfox.inc.php; include info.inc.php; ? LINK href=js/cpcw.css
rel=stylesheet /LINK /head body bgcolor=#FFFFFF ?
$tem=$HTTP_COOKIE_VARS[FlyFoxNet];//取COOKIE信息
$temp=explode(|,$tem); $cookiem=$temp[0];
$useinfo=cuser($cookiem,$action); if ($useinfo[2]==游客) $usename=1; ?
table width=100% cellpadding=4 cellspacing=0 border=0 tr td height=40
rowspan=2 width=60% div align=right/div div align=right/div /td td
height=20 width=10%/td td height=20 width=10%/td td height=20
width=10%/td td height=20 width=10%/td /tr tr td height=20 width=10% div
align=centera href=reguse.php?action=xyimg src=images/top_register.gif
width=74 height=21 border=0/a/div /td td height=20 width=10% div
align=centera href=useinfo.php?action=findimg
src=images/top_members.gif width=74 height=21 border=0/a/div /td td
height=20 width=10%a href=useinfo.php?action=editimg
src=images/top_profile.gif width=74 height=21 border=0/a/td td
height=20 width=10%a href=okey.php?d=qimg src=images/top_logout.gif
width=74 height=21 border=0/a/td /tr tr td height=20 div
align=left当前位置:font color=#0000FF狐网─狐网论坛─发布论题/font ?
echo font color=’00dd00′.$useinfo[2]./font; ?/div /td td height=20 div
align=centera href=foxbbs.phpimg src=images/index.gif width=70 height=20
border=0 align=middle/a/div /td td height=20 width=10% div align=centera
href=superuse.phpimg src=images/super.gif width=70 height=20 border=0
align=middle/a/div /td td height=20 width=10% div align=centera
href=reguse.php?action=xyimg src=images/dl.gif width=70 height=20
border=0 align=middle/a/div /td td height=20 width=10% div align=centera
href=../index.phpimg src=images/fox.gif width=70 height=20 border=0
align=middle/a/div /td /tr /table script
language=JavaScript//这段JS用来检查表单内信息状态,是不是有点眼熟?呵呵……OSO上CUT下来的了。
!– var submitcount=0; function checkSubmit() { if (submitcount == 0) {
submitcount++; return true; } else { if (submitcount0){
alert(帖子已成功提交了,别急,等等!); return false; } } } function
check_com(){ if(document.form.title.value.length ==0){ submitcount–;
alert(主题不能为空!快填上吧!); return false; }
if(document.form.message.value.length == 0){ submitcount–;
alert(OH!SORRY!加贴内容不能为空!); return false; } return true; } //–
/script table width=100% border=0 cellspacing=0 cellpadding=0 tr
bgcolor=#009999 td height=20div align=’center’font color=ffffff
?//在前面检查是否用户时给$USEINFO[0]赋了用户信息。 if ($useinfo[0])
echo font color=’00ff00′[.$useinfo[2].]/font
你好!请在下面填写你的贴子。; else echo font
color=’00ff00′.$useinfo[2]./font你好,请先登录,再发帖,如果你还未注册,请先注册吧!;
?/font/div /td /tr tr td height=20 /td /tr tr td height=20 class=bott
table width=65% border=0 cellspacing=0 cellpadding=0 align=center tr td
height=100 div align=left form name=form method=post onSubmit=return
check_com() ACTION=’okey.php’ ? if
($usename==1)//前面检查时如果没找到信息,则给$usename赋值为1,这里,用来判断是否需要用户身份校验。
{ echo 用户名:input style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM:
#000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT:
#000000 1px dashed; BORDER-TOP: #000000 1px dashed; type=’text’
name=’username’ maxlength=’8′ size=’20’ 如果你还未注册,就来a
href=’reguse.php?action=xy’这里注册/abr; echo 密 码:input
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed; type=’password’ name=’userpass’
size=’20’ maxlength=’8′ 忘了密码来这里a
href=’useinfo.php?c=pass’取回密码/a!p; } ? div align=center主 题:input
style=BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed; type=text name=title size=40
maxlength=20/divbr div align=center帖子内容br textarea
style=BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed; name=message wrap=VIRTUAL cols=75
rows=10/textarea input type=submit class=bott name=Submit
value=好了!提交 onClick=return checkSubmit()input type=reset class=bott
name=Submit2 value=擦了!重写 /div /form /div /td /tr /table /td /tr tr
bgcolor=#009999 td height=20/td /tr /table /body /html

主界面,也就是显示主题列表的这页。 //foxbbs.php 功能:显示论坛的主题
HTML HEAD TITLE狐网论坛/TITLE STYLE type=text/css P {FONT-FAMILY:
normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt} DIV {FONT-FAMILY: normal;
FONT-SIZE: 9pt; LINE-HEIGHT: 14pt} /STYLE LINK href=js/lfox.css
rel=stylesheet /LINK ?php include linkfox.inc.php; include info.inc.php;
? /HEAD body bgcolor=#FFFFFF ?
$tem=$HTTP_COOKIE_VARS[FlyFoxNet];//这里取COOKIE里的信息
$temp=explode(|,$tem);//因为用户名和密码是用|分隔并记录在COOKIE里的
$cookiem=$temp[0];//取用户名
$useinfo=cuser($cookiem,$action);//CUSER这个函数是用来判别是否从COOKIE中取出了信息
$query=select usename from useinfo where usename=’.$useinfo[0].’;
//检查是否注册用户 $req=mysql_query($query); if ($req) {
$usename=mysql_fetch_array($req);if($usename[0]==$useinfo[0])
$useinfo[0]=$usename[0];else { $usename=1; $useinfo[0]=游客; } }
else $usename=1;$useinfo[0]=游客; ? table width=100% cellpadding=4
cellspacing=0 border=0 tr td height=40 rowspan=2 width=60% div
align=right/div div align=right/div /td td height=20 width=10%/td td
height=20 width=10%/td td height=20 width=10%/td td height=20
width=10%/td /tr tr td height=20 width=10% div align=centera
href=reguse.php?action=xyimg src=images/top_register.gif width=74
height=21 border=0/a/div /td td height=20 width=10% div align=centera
href=useinfo.php?action=findimg src=images/top_members.gif width=74
height=21 border=0/a/div /td td height=20 width=10%a
href=useinfo.php?action=editimg src=images/top_profile.gif width=74
height=21 border=0/a/td td height=20 width=10%a href=okey.php?d=qimg
src=images/top_logout.gif width=74 height=21 border=0/a/td /tr tr td
height=20 width=60% div align=left当前位置:font
color=#0000FF狐网─狐网论坛─主题列表/font ? echo font
color=’00dd00′.$useinfo[2]./fontfont color=’ff0000′; echo
欢迎你来到论坛!/font; ?/div /td td height=20 width=10% div
align=center? echo a href=’post.php’img src=’images/newthread.gif’
width=’70’ height=’20’ border=’0′ alt=’发布新帖’/a;?/div /td td
height=20 width=10% div align=center? if ($action==find) echo a
href=’foxbbs.php’img src=’images/dispall.gif’ width=’70’ height=’20’
border=’0′ alt=’显示所有贴子列表’/a; else echo a
href=’superuse.php’target=’_blank’img src=’images/super.gif’ border=’0′
alt=’管理专区,非请莫进’/a;?/div /td td height=20 width=10% div
align=centera href=reguse.php?action=dlimg src=images/dl.gif border=0
alt=登录用户/a/div /td td height=20 width=10% div align=centera href=
target=_blankimg src=images/fox.gif border=0 alt=返回狐网首页/a/div /td
/tr /table ? echo table width=’100%’ border=’0′ cellspacing=’0′
cellpadding=’0′; echo tr bgcolor=’#000000’tdtable width=’100%’
border=’0′ cellspacing=’1′ cellpadding=’1′; ?tr bgcolor=#229999 td
width=5% div align=centerfont color=#FFFFFF状态/font/div /td td
width=5% div align=centerfont color=#FFFFFF表情/font/div /td td
width=30% div align=centerfont color=#FFFFFF主 题/font/div /td td
width=25% div align=centerfont color=#FFFFFF作 者/font/div /td td
width=5% div align=centerfont color=#FFFFFF回复/font/div /td td
width=5% div align=centerfont color=#FFFFFF人气/font/div /td td
width=25% div align=centerfont color=#FFFFFF最后回复时间/font/div /td
/tr ?php $imgnum=20;//点击次数,准备改状态图 if (!$user) $user=all;
$query=select count(*) from foxbbs;//首先计算总的论题数
$req=mysql_query($query); if ($req) { $row=mysql_fetch_array($req);
$num=$row[0]; if (!$rows) $rows=10;//控制每页显示条数 if (!$l)
$l=1;//设定排序方式 if ($num/$rows1) $page=1;//计算总页数 else
if($num/$rows==floor($num/$rows)) $page=$num/$rows; else
$page=floor($num/$rows)+1; if (!$dpage) $dpage=1;//当前显示的页数 if
($dpage$page) $dpage=$page;//不能超过最大页数 if ($dpage==1)
$tem=0;//控制当前页应该显示的信息 else $tem=($dpage-1)*$rows; if
($l==2) $s=hfnum; else if ($l==3) $s=djnum; else $s=id; for
($i=0;$i$rows;$i++)//根据设定的每页行数来取记录 { $tem1=$tem+1;
if($action==find) $query=select * from foxbbs where usename=’.$user.’
order by $s desc limit $tem,$tem1; else $query=select * from foxbbs
order by $s desc limit $tem,$tem1;$req=mysql_query($query); if ($req) {
$bbs=mysql_fetch_array($req);//看有没有回复时间,如果没有就取发帖时间代替回复时间
if ($bbs[3]) { if (!$bbs[8]) $bbs[8]=$bbs[4]. .$bbs[1]; else
$bbs[8]=$bbs[8]. .$bbs[10]; if
(substr($bbs[4],0,-8)==date(Y年n月j日)&&$bbs[6]$imgnum&&$bbs[12]!=1)//
如果是当天的帖子 $img=images/newfolder.gif; else
if(substr($bbs[4],0,-8)==date(Y年n月j日)&&$bbs[djnum]=$imgnum&&$bbs[12]!=1)//如果是当天,并且点击数上10
$img=images/newhotfolder.gif; else
if(substr($bbs[4],0,-8)!=date(Y年n月j日)&&$bbs[6]=$imgnum&&$bbs[12]!=1)//如果不是当天,但点击上20
$img=images/hotfolder.gif; else if($bbs[12]==1)
$img=images/lock.gif;//已锁 else $img=images/folder.gif; echo tr
bgcolor=’#eeeeee’; echo td width=’5%’div align=’center’img
src=’.$img.’/div/td; echo td width=’5%’div align=’center’img
src=’images/.$bbs[2]..gif’/div/td; echo td width=’30%’div
align=’left’; if ($bbs[12]==1) echo $bbs[3]./div/td; else echo a
href=’dispbbs.php?id=.$bbs[0].&use=.$bbs[1].’.$bbs[3]./a/div/td;
echo td width=’25%’div align=’center’.$bbs[1]./div/td; echo td
width=’5%’div align=’center’.$bbs[7]./div/td; echo td width=’5%’div
align=’center’.$bbs[6]./div/td; echo td width=’25%’div
align=’left’.$bbs[8]./div/td/tr; } } $tem++; } } echo trtd
colspan=’7′; echo table width=’100%’ border=’0′ cellspacing=’0′
cellpadding=’0′; echo tr; echo td height=’15’ width=’100%’ colspan=’3′
bgcolor=’#229999’div align=’left’font color=’ffffff’|=== ; if($page==1)
{ echo [] []; } else if ($dpage==1)//如果当前在第一页 { $u=$dpage+1;
echo [] a
href=’foxbbs.php?dpage=.$u.&rows=.$rows.&l=.$l.&user=.$user.'[]/a; }
else if($dpage1&&$dpage$page)//如果当前在中间页 { $u=$dpage+1;
$d=$dpage-1; echo a
href=’foxbbs.php?dpage=.$d.&rows=.$rows.&l=.$l.&user=.$user.'[]/a a
href=’foxbbs.php?dpage=.$u.&rows=.$rows.&l=.$l.&user=.$user.'[]/a; }
else if($dpage==$page)//如果当前在最后一页 { $d=$dpage-1; echo a
href=’foxbbs.php?dpage=.$d.&rows=.$rows.&l=.$l.&user=.$user.'[]/a
[]; } echo /font/div/td; echo /tr/table/td/tr/table/td/tr/table; echo
div align=’center’论题数:.$num. 当前第.$dpage.页/共有.$page.页select
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ name=’dpage’
onChange=’javascript:location.href=this.options[this.selectedIndex].value’;
for ($i=1;$i=$page;$i++) { if ($i==$dpage) echo option
value=’foxbbs.php?dpage=.$i.&rows=.$row.&l=.$l.&user=.$user.’
selected第.$i.页/option; else echo option
value=’foxbbs.php?dpage=.$i.&rows=.$rows.&l=.$l.’第.$i.页/option; } echo
/select; echo select style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM:
#000000 1px dashed; BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT:
#000000 1px dashed; BORDER-TOP: #000000 1px dashed;’ name=’dpage’
onChange=’javascript:location.href=this.options[this.selectedIndex].value’;
echo option value=” selected选择排序方式/option; echo option
value=’foxbbs.php?dpage=.$dpage.&rows=.$rows.&user=.$user.&l=1’安发贴时间排序/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=.$rows.&user=.$user.&l=3’安点击数排序/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=.$rows.&user=.$user.&l=2’安回复数排序/option;
echo /select; echo select style=’BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
name=’dpage’
onChange=’javascript:location.href=this.options[this.selectedIndex].value’;
echo option value=” selected选择每页显示行/option; echo option
value=’foxbbs.php?dpage=.$dpage.&rows=5&l=.$l.&user=.$user.’每页五行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=10&l=.$l.&user=.$user.’每页十行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=15&l=.$l.&user=.$user.’每页十五行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=20&l=.$l.&user=.$user.’每页二十行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=25&l=.$l.&user=.$user.’每页二十五行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=30&l=.$l.&user=.$user.’每页三十行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=35&l=.$l.&user=.$user.’每页三十五行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=40&l=.$l.&user=.$user.’每页四十行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=45&l=.$l.&user=.$user.’每页四十五行/option;
echo option
value=’foxbbs.php?dpage=.$dpage.&rows=50&l=.$l.&user=.$user.’每页五十行/option;
echo /select; $query=select count(*) from useinfo;//统计注册用户数
$req=mysql_query($query); $usenum=mysql_fetch_array($req);
$query=select usename from useinfo order by useid desc limit
0,1;//查找最新注册的用户,因为ID是自增的,所以可以根据ID来判断,最大的也就是最新的。
$req=mysql_query($query); $newuse=mysql_fetch_array($req); echo
目前共有成员[font color=’ff0000′.$usenum[0]./font]名/最新加盟[font
color=’ff0000′.$newuse[0]./font]; ? table width=100% border=0
cellspacing=0 cellpadding=0 tr td height=30/td /tr tr td height=30 table
width=100% border=0 cellspacing=0 cellpadding=0 tr td height=20
width=20% div align=left状态说明:/div /td td height=20 width=20% div
align=left/div /td td height=20/td td height=20/td /tr tr td height=20
width=25% div align=leftimg src=images/newfolder.gif width=14 height=11
当天产生新论题/div /td td height=20 width=25% div align=leftimg
src=images/newhotfolder.gif width=14 height=17 当天回复最高的论题/div
/td td height=20 width=25% div align=leftimg src=images/folder.gif
width=14 height=11 一天以前的论题/div /td td height=20 width=25% div
align=leftimg src=images/hotfolder.gif width=14 height=17
总计回复超过50个的论题/div /td /tr tr td height=20 width=25% div
align=leftimg src=images/lock.gif width=12 height=15 已被关闭的主题 /div
/td td height=20 width=25% div align=left/div /td td height=20 width=25%
div align=left/div /td td height=20 width=25% trtd colspan=4
height=100div align=centerfont color=ff0000★论坛说明★/font/divbrdiv
align=left
1、此论坛只有注册用户才能发贴,如果您没注册,可以游客身份,查看、回复贴子,但是不能发帖。br
2、发帖用户将对论坛内所发的言论负全部责任,回本论坛主要是以情感方面为话题,,如果站长一旦发现有用户使用本论坛讨论其它无关话题,将会立即加锁。br
3、我还没想到。呵呵…… /div/td/tr div align=left/div trtd height=70/td/tr
tr td height=20 colspan=4 div align=center a
href=mailto:hllinyu@netease.com与我联系/a |─| a
href=mailto:hllinyu@netease.comFlyFox@Net/a /div /td /tr trtd
height=20/td/tr tr td height=20 colspan=4 div align=centerfont
color=#6666FF飞狐工作室制作开发/font/div /td /tr /table /td /tr /body
/html

reguse.inc.php处理注册用户时的信息

<?

function regok($mess,$reginfo)       //记录成功后输出用户信息
{
echo “<table width=’70%’ border=’0′ cellspacing=’0′ cellpadding=’0′
bgcolor=’#000000′ align=’center’>”;
echo “<tr><td><table width=’100%’ border=’0′
cellspacing=’1′ cellpadding=’1′ align=’center’
bgcolor=’#eeeeee’><tr bgcolor=’#006699′><td
colspan=’4′><div align=’center’><font
color=’ffffff’>”.$mess.”</font></div></td></tr>”;
echo “<tr ><td width=’15%’ ><div
align=’left’>ID号:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[13].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>用户:</div></td><td width=’35%’
><div align=’center’><font
color=’#FF0000′>”.$reginfo[0].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>密码:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[1].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>主页:</div></td><td width=’35%’
><div align=’center’><font
color=’#FF0000′>”.$reginfo[9].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>邮箱:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[8].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>oicq:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[3].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>昵称:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[2].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>等级:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[11].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>性别:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[4].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>年龄:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[5].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>职业:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[6].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>来自:</div></td><td width=’35%’
><div align=’center’><font
color=’#FF0000′>”.$reginfo[7].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>信息保密:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[12].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>签名:</div></td><td width=’35%’
><div align=’center’><font
color=’#FF0000′>”.$reginfo[10].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>邮件通知:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[18].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>注册时间:</div></td><td width=’35%’
><div align=’center’><font
color=’#FF0000′>”.$reginfo[15].”</div></td></tr>”;
echo “<tr ><td width=’15%’><div
align=’left’>登录时间:</div></td><td
width=’35%’><div align=’center’><font
color=’#FF0000′>”.$reginfo[16].”</font></div></td>”;
echo “<td width=’15%’><div
align=’left’>头像:</div></td><td width=’35%’
><div align=’center’><img
src=’images/”.$reginfo[14].”.gif’></div></td></tr>”;
$reginfo=$reginfo[0];
echo “<tr bgcolor=’#006699′><td colspan=’4′><div
align=’center’><a
href=’reguse.php?action=dl&use=”.$reginfo.”‘>用户登录</a></div></td></tr>”;
echo “</table></td></tr></table>”;

}

     //检查信息并写入记录
function
reg($usename,$usepass,$usemail,$useweb,$useni,$useoicq,$usesex,$useage,$usezy,$useaddr,$useinf,$usety,$usebq,$useqm)
{
  if ($usename)     //如果有用户名传入则处理   用户注册模块
    {
      if(strlen($usename)>8) return 1;
      else if(strlen($usepass)>8) return 2;
      else if(strlen($useoicq)>12) return 3;
      else if(!uinfo($usepass,pass)) return 4;
      else if(!uinfo($usename,name)) return 5;
      else if(!uinfo($useoicq,oicq)) return 6;
      else if(!uinfo($usemail,mail)) return 7;
      else
        {
          if(!$useinf) $useinf=2;
          $query=”select * from useinfo where
usename='”.$usename.”‘”;  //是否已经存在用户
          $req=mysql_query($query);
          $useinfp=mysql_fetch_array($req);
          if ($useinfp[0]) return 8;
          else
            {
              $time=date(Y年n月j日G时i分);
              $useqm=nl2br($useqm);                                                                            //写入用户信息
              $query=”insert into useinfo
(usename,usepass,usemail,useweb,useni,useoicq,usesex,useage,usezy,useaddr,useinf,usety,usebq,useqm,useattr,regdate,enddate)
values
(‘”.$usename.”‘,'”.$usepass.”‘,'”.$usemail.”‘,'”.$useweb.”‘,'”.$useni.”‘,'”.$useoicq.”‘,'”.$usesex.”‘,'”.$useage.”‘,'”.$usezy.”‘,'”.$useaddr.”‘,'”.$useinf.”‘,'”.$usety.”‘,'”.$usebq.”‘,'”.$useqm.”‘,1,now(),'”.$time.”‘)”;
              $req=mysql_query($query);
              if ($req)
                 {
                 $query=”select * from useinfo where
usename='”.$usename.”‘”;  //取出用户信息,并传出用户端
                 $req=mysql_query($query);
                 $useinfo=mysql_fetch_array($req);
                 return $useinfo;
                 }
              else return 10;
            }
        }
        return 9;
    }
}

function
usemess($mess,$usename,$usemail,$useweb,$useni,$useoicq,$useaddr,$useqm)      //信息输入表单
{
echo “<FORM METHOD=post>”;
echo “<table width=’90%’ border=’0′ cellspacing=’0′ cellpadding=’0′
bgcolor=’#000000′ align=’center’>”;
echo “<tr><td><table width=’100%’ border=’0′
cellspacing=’1′ cellpadding=’1′ align=’center’>”;
echo “<tr bgcolor=’#006699′><td colspan=’2′><font
color=’ffffff’><div align=’center’>狐网论坛用户注册—<font
color=’00ff00′>”.$mess.”</font></div></font></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’> 用 户 名:<font
color=’#FF0000′>八位,第一位必须是字母</FONT></div></td><td
width=’52%’><input onFocus=’this.select()’
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’usename’ size=’30’
maxlength=’8′ value='”.$usename.”‘></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>密  码:<font
color=’#FF0000′>八位,数字和字母组合.</font></div></td><td
width=’52%’><input style=’BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
type=’password’ name=’usepass’ size=’30’
maxlength=’8′></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>电子信箱:<font
color=’#FF0000′>请填写真实的邮箱地址。</font></div></td><td
width=’52%’><input onFocus=’this.select()’
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’usemail’ size=’50’
maxlength=’50’ value='”.$usemail.”‘></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>个人主页:</div></td><td
width=’52%’><div align=’left’><input onFocus=’this.select()’
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’useweb’ size=’50’
maxlength=’50’
value='”.$useweb.”‘></div></td></tr>”;
echo “<tr bgcolor=’#006699′><td colspan=’2′><div
align=’center’><font
color=’#FFFFFF’>个人信息设定</font></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>你的昵称:</div></td><td
width=’52%’><div align=’left’><input onFocus=’this.select()’
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’useni’ size=’30’
maxlength=’15’
value='”.$useni.”‘></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>OICQ:</div></td><td
width=’52%’><div align=’left’><input onFocus=’this.select()’
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’useoicq’ size=’20’
maxlength=’20’
value='”.$useoicq.”‘></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>性  别:</div></td><td
width=’52%’><div align=’left’><select
onFocus=’this.select()’ style=’BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
name=’usesex’><option value=’1′
selected>我是男生</option><option
value=’0′>我是女生</option></select></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>年  龄:</div></td><td
width=’52%’><div align=’left’><select
onFocus=’this.select()’ style=’BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
name=’useage’><option
value=’14’>15岁以下</option><option value=’15’>15
岁</option><option value=’16’>16 岁</option><option
value=’17’>17 岁</option>”;
echo “<option value=’18’>18 岁</option><option
value=’19’>19 岁</option><option value=’20’ selected>20
岁</option><option value=’21’>21 岁</option><option
value=’22’>22 岁</option><option value=’23’>23
岁</option><option value=’24’>24 岁</option><option
value=’25’>25 岁</option><option value=’26’>26
岁</option><option value=’27’>27 岁</option><option
value=’28’>28 岁</option><option value=’29’>29
岁</option><option
value=’30’>30或以上</option></select></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>职  业:</div></td><td
width=’52%’><div align=’left’><select
onFocus=’this.select()’ style=’BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
name=’usezy’><option value=’5′
selected>我是学生</option><option
value=’1′>公务员</option><option
value=’2′>公司雇员</option><option
value=’3′>自由职业</option><option
value=’4′>无所事事</option><option
value=’5′>不告诉你</option></select></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>来自何方:</div></td><td
width=’52%’><div align=’left’><input onFocus=’this.select()’
style=’BACKGROUND-COLOR: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’useaddr’ size=’50’
maxlength=’50’
value='”.$useaddr.”‘></div></td></tr>”;
echo “<tr bgcolor=’#006699′><td colspan=’2′><div
align=’left’></div><div align=’center’><font
color=’#FFFFFF’>参数设定</font></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>是否充许他人查看你的信息:</div></td><td
width=’52%’><div align=’left’><input type=’radio’
name=’useinf’ value=’2′>否  <input type=’radio’ name=’useinf2′
value=’1′ checked>是</div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’
valign=’top’><div
align=’left’>个人签名档:</div></td><td
width=’52%’><div align=’left’><textarea
onFocus=’this.select()’ style=’BACKGROUND-COLOR: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
name=’useqm’ cols=’40’ wrap=’VIRTUAL’
rows=’5′>”.$useqm.”</textarea></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td width=’40%’><div
align=’left’>是否允许版主或管理员给你发邮件通知:</div></td><td
width=’52%’><div align=’left’><input type=’radio’
name=’usety’ value=’2′>否  <input type=’radio’ name=’usee2′
value=’1′ checked>是</div></td></tr>”;
echo “<tr bgcolor=’#006699′><td colspan=’2′><div
align=’center’><font
color=’#FFFFFF’>头像设定</font></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td colspan=’2′><div
align=’center’><input type=’radio’ name=’bq[0]’
value=’a’><img src=’images/a.gif’ width=’15’ height=’15’
checked>  <input type=’radio’ name=’bq[1]’ value=’1′><img
src=’images/1.gif’ width=’15’ height=’15’>  <input type=’radio’
name=’bq[2]’ value=’2′><img src=’images/2.gif’ width=’15’
height=’15’>  <input type=’radio’ name=’bq[3]’
value=’3′><img src=’images/3.gif’ width=’15’ height=’15’>
 <input type=’radio’ name=’ba[4]’ value=’4′><img
src=’images/4.gif’ width=’15’ height=’15’>  ”;
echo “<input type=’radio’ name=’bq[5]’ value=’5′><img
src=’images/5.gif’ width=’15’ height=’15’>  <input type=’radio’
name=’bq[6]’ value=’6′><img src=’images/6.gif’ width=’15’
height=’15’>  <input type=’radio’ name=’ba7′
value='[7]’><img src=’images/7.gif’ width=’15’ height=’15’>
 <input type=’radio’ name=’ba[8]’ value=’8′><img
src=’images/8.gif’ width=’15’ height=’15’>  <input type=’radio’
name=’ba[9]’ value=’9′><img src=’images/9.gif’ width=’15’
height=’15’></div></td></tr>”;
echo “<tr bgcolor=’#eeeeee’><td
colspan=’2′></td></tr>”;
echo “</table></td></tr></table>”;
echo “<div align=’center’><INPUT TYPE=’HIDDEN’ NAME=’action’
VALUE=’add’><INPUT class=’bott’ TYPE=’SUBMIT’ name=’submit’
VALUE=’提 交!’><INPUT class=bott TYPE=’RESET’ NAME=’Reset’
VALUE=’重 填’></form></div>”;
}
function dlmes($mess)
{
echo “<table width=’50%’ border=’0′ cellspacing=’0′ cellpadding=’0′
bgcolor=’#000000′ align=’center’>”;
echo “<tr><td>”;
echo “<table width=’100%’ border=’0′ cellspacing=’1′ cellpadding=’1′
bgcolor=’#eeeeee’><form method=’post’>”;
echo “<tr bgcolor=’#009999′><td><div
align=’center’><font
color=’#FFFFFF’>”.$mess.”</font></div></td></tr>”;
echo “<tr><td><div align=’center’>用户名:<input
type=’text’ name=’uname’></div></td></tr>”;
echo “<tr><td><div align=’center’>密 码:<input
type=’password’ name=’upass’></div></td></tr>”;
echo “<tr><td><div align=’center’><input
type=’submit’ name=’Submit’
value=’确定’></div></td></tr>”;
echo “<tr><td><input type=’hidden’ name=’action’
value=’dl’></td></tr>”;
echo “<tr><td><div align=’center’><a
href=’useinfo.php?action=pass’>[忘记密码]</a>     <a
href=’reguse.php?action=xy’>[我要注册]</a></div></td></tr>”;
echo “<tr bgcolor=’#009999′><td
height=’20’></td></tr>”;
echo
“</form></table></td></tr></table>”;
}
?> 

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

Leave a Reply

网站地图xml地图