我的论坛源代码(三)

体现大旨内容页面。 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/cpcw.css rel=stylesheet /LINK ?php include linkfox.inc.php;
include info.inc.php; ? /HEAD body bgcolor=#FFFFFF text=#000000 id=all
? $query=select * from foxbbs where
id=’.$id.’;//那一个ID是从面也正是FOXBBS.PHP里传过来的。
$req=mysql_query($query); if ($req) {
$bbsmes=mysql_fetch_array($req);
$djnum=$bbsmes[djnum]+1;//点击数加一 $query=update foxbbs set
djnum=’$djnum’ where id=’.$id.’; $req=mysql_query($query); }
$query=select * from useinfo where
usename=’.$bbsmes[usename].’;//从客户消息Curry抽取发帖客户的消息$req=mysql_query($query); if ($req) {
$useinfo=mysql_fetch_array($req); switch
($useinfo[11]卡塔尔(قطر‎//因为作者是用壹个人数字来代表顾客身份 { case
($useinfo[11]==1): $useinfo[11]=会员; break; case
($useinfo[11]==2): $useinfo[11]=版主; break; case
($useinfo[11]==3): $useinfo[11]=管理员; break; case
($useinfo[11]==4): $useinfo[11]=站长; break; default:
$useinfo[11]=游客; break; } } ? table width=100% cellpadding=4
cellspacing=0 border=0 tr td height=20 div align=right/div /td td
height=20 width=75/td td height=20 width=75/td td height=20 width=75/td
td height=20 width=75/td /tr tr td height=20 div align=right/div /td td
height=20 width=75 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=75 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=useimg
src=images/top_profile.gif width=74 height=21 border=0/a/td td
height=20 width=75a href=foxbbs.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/div /td
td div align=centera href=foxbbs.phpimg src=images/index.gif width=70
height=20 border=0/a/div /td td div align=centera href=post.phpimg
src=images/newthread.gif width=70 height=20 border=0 alt=揭橥新帖/a/div
/td td height=20 width=百分之十 div align=center? echo a
href=’repal.php?action=add&id=.$id.&zt=.$bbsmes[3].&use=.$use.’img
src=’images/reply.gif’ width=’70’ height=’20’ border=’0′
alt=’回复此贴’/a; ?/div /td td height=20 width=十分一 div align=centera
href=reguse.php?action=dlimg src=images/dl.gif width=70 height=20
border=0/a/div /td /tr /table table width=100% border=0 cellspacing=0
cellpadding=0 tr bgcolor=#000000 td colspan=2 table width=100% border=0
cellspacing=1 cellpadding=1 tr bgcolor=#009999 td width=20% div
align=centerfont color=#FFFFFF原贴我/font/div /td td width=百分之八十 div
align=centerfont color=#FFFFFF原 贴 内 容/font/div /td /tr tr
bgcolor=#eeeeee valign=top td width=十分之四 div align=center
?//在顾客音讯库里没存放表情图象的路径和扩展名 echo $useinfo[2].br;
echo img src=’images/.$bbsmes[2].’.gifbr; echo $useinfo[11].p; echo
发帖数 [.$useinfo[ftnum].]br; ?/div /td td width=80%div align=left ?
$ft=foxbbs/.$bbsmes[5]..fox;//抽出寄存的文书名
$message=@file($ft卡塔尔国;//读出文件内容 for ($i=0;$icount($message卡塔尔(قطر‎;$i++State of Qatar {
if (ord(substr($message[$i],0,1State of QatarState of Qatar==161State of Qatar//第一个人是或不是全角空格 echo
$message[$i]; else { $message[$i]= .trim($message[$i]);echo
$message[$i];//显示主题内容 } } ?/div/td /tr tr bgcolor=#009999 td
width=20% div align=leftimg src=images/posticon.gif width=14 height=11?
echo $bbsmes[4]; ?/div /td td width=80% div align=left? if
($useinfo[9]==不告知你State of Qatar echo img src=’images/email.gif’ width=’43’
height=’17’; else echo a href=’mailto:.$useinfo[8].’img
src=’images/email.gif’ width=’43’ height=’17’ alt=’给小编发邮件’
border=’0’/a; echo a href=’.$useinfo[9]澳门新葡萄京官网首页,.’ img src=’images/home.gif’
width=’43’ height=’17’ alt=’小编的主页’ border=’0’/a; echo a
href=’useinfo.php?action=look’img src=’images/profile.gif’ width=’43’
height=’16’ alt=’小编的详细新闻’ border=’0’/a; echo a
href=’useinfo.php?action=edit’img src=’images/edit.gif’ width=’43’
height=’17’ alt=’订正消息’ border=’0’/a; echo a
href=’foxbbs.php?action=find&user=.$useinfo[0].’img
src=’images/find.gif’ width=’43’ height=’17’ alt=’查找该客户的所以文章’
border=’0’/a; echo a
href=’repal.php?action=add&use=.$useinfo[13].&id=.$id.&zt=.$bbsmes[3].&c=dd’img
src=’images/quote.gif’ width=’43’ height=’17’ alt=’援引该客户的文章回复’
border=’0’/a; echo a href=’#’img src=’images/ip.gif’ border=’0′
alt=’.$bbsmes[11].’/a; ? /div /td /tr /table /td /tr tr ?
$hfft=foxbbs/.substr($bbsmes[5])..bbs; if
(file_exists($hfftState of Qatar卡塔尔(قطر‎//是不是有回复 { $tem=@file($hfft卡塔尔国;
$temp=implode(,$tem卡塔尔(قطر‎;//先把数组转换成字符串,不用加分融符
$tem=explode(δεζ,$temp卡塔尔(قطر‎; $num=count($temState of Qatar-1; for ($i=0;$i$num;$i++){$x=$i+1; $temp=explode(ㄞㄚㄓ,$tem[$i]卡塔尔国;//把每条回复音信分别 if
($temp[5]0) $temp[5]=images/.$temp[5]..gif;//展现回复内容 else
$temp[5]=images/a.gif; if (!$temp[6]) $temp[6]=不想告诉你; echo
trtdtable width=’百分百’ border=’0′ cellspacing=’1′ cellpadding=’1′; echo
tr bgcolor=’#009999’td width=’20%’div align=’center’font
color=’#FFFFFF’回贴小编/font/div/td; echo td width=’百分之七十’div
align=’center’font color=’#FFFFFF’回 复 内 容 (第font
color=’00ff00’NO..$x./font号)/font/div/td/tr; echo tr bgcolor=’#eeeeee’
valign=’top’td width=’20%’div align=’center’.$temp[1].brimg
src=’.$temp[5].’brOICQ:.$temp[2].br来自:.$temp[6].font
color=’#FFFFFF’/font/div/td; echo td width=’80%’div
align=’left’.$temp[0]./div/td/tr; echo tr bgcolor=’#009999’td
width=’20%’div align=’left’font color=’#FFFFFF’img
src=’images/posticon.gif’ width=’14’
height=’11’.$temp[7]./font/div/td; echo td width=’80%’div
align=’left’; echo a href=’mailto:.$temp[4].’img
src=’images/email.gif’ width=’43’ height=’17’ alt=’给笔者发邮件’
border=’0’/a; echo a href=’.$temp[3].’ img src=’images/home.gif’
width=’43’ height=’17’ alt=’作者的主页’ border=’0’/a; echo a href=’#’img
src=’images/ip.gif’ border=’0′ alt=’.$temp[8].’/a; echo /div/td/tr;
echo /table/td/tr; } } ? /tr /table /body /html

repal.php回复用的页面,因为回复能够不需要是客户,所以没加顾客身份校验
html head title回复论题:? echo $zt;?/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 LINK href=js/cpcw.css rel=stylesheet /LINK
?php include linkfox.inc.php;//包括进文件 include info.inc.php; function
yy($fState of Qatar { $oldmess=@file($f卡塔尔国;//援用原来的书文管理 for
($i=0;$icount($oldmess卡塔尔(قطر‎;$i++卡塔尔 { if
(ord(substr($oldmess[$i],0,1卡塔尔国卡塔尔(قطر‎==161卡塔尔国//第一人是或不是全角空格
$mess=$mess.$oldmess[$i]; else $mess=$mess. .trim($oldmess[$i]); }
return $mess; } function mesput($query,$use,$id){
$req=mysql_query($query卡塔尔国; if ($reqState of Qatar { echo script language=’JavaScript’
alert(‘多谢你的回复!系统将回到论题!’卡塔尔(قطر‎; /script; echo script
language=’JavaScript’
javascript:location.href=’dispbbs.php?id=.$id.&use=.$use.’; /script;;
echo div align=’center’a
href=’dispbbs.php?id=.$id.&use=.$use.’要是系统并未有反应,请点击/a/a; }
else echoscript language=’JavaScript’ alert(‘写入失利!’卡塔尔; /script; }
function
usehf($message,$useinfo,$id,$use,$ft,$mess,$c卡塔尔(قطر‎//客商回复就径直从表里调出顾客信息{ $query=select * from useinfo where usename=’.$useinfo[0].’;
$req=mysql_query($query); if ($req) {
$useinfo=mysql_fetch_array($req); $fo=fopen($ft,a);
$message=str_replace(,,str_replace(,,$message));
$message=nl2br($message); $gip=getenv(REMOTE_ADDR);
$messages=$message.ㄞㄚㄓ.$useinfo[2].ㄞㄚㄓ.$useinfo[3].ㄞㄚㄓ.$useinfo[9].ㄞㄚㄓ.$useinfo[8].ㄞㄚㄓ.$useinfo[14].ㄞㄚㄓ.$useinfo[11].ㄞㄚㄓ.$time.ㄞㄚㄓ.$gip.δεζ;
if($c==dd卡塔尔国//借使是引用回复,加上原作内容 { $messages=font
color=’999999′.$mess.div
align=’center’★原版的书文……★……援用★/div/fontbr.$messages; }
$fp=fputs($fo,$messagesState of Qatar;
$time=date(Y年n月j日G时i分卡塔尔(قطر‎;//宗旨回复数加一,覆盖上一次复人与时光
$query=update foxbbs set
hfnum=hfnum+1,hfname=’.$ft.’,hfusename=’.$useinfo[2].’,hfdate=’.$time.’
where id=’.$id.’; mesput($query,$use,$idState of Qatar; } else { echo script
language=’JavaScript’ alert(‘数据库错误:104号’); /script; } } function
gr($ft,$message,$youname,$youmail,$youoicq,$youweb,$youaddr,$youbq,$id,$use,$mess,$cState of Qatar//非注册顾客{ if (!uinfo($youmail,mail卡塔尔||strlen($youmailState of Qatar12卡塔尔国//校验MAIL { echo script
language=’JavaScript’ alert(‘请输入正确的MAIL地址!’卡塔尔(قطر‎; /script; } else
if (!uinfo($youoicq,oicq卡塔尔(قطر‎||strlen($youoicq卡塔尔(قطر‎12卡塔尔//校验OICQ,只可以决断是还是不是数字和位数,如若有更加好的形式就好。 { echo script
language=’JavaScript’ alert(‘请输入准确的OICQ号!’卡塔尔; /script; } else {
if (uinfo($youweb,web卡塔尔(قطر‎==OK&&substr($youweb,0,3卡塔尔国!=htt卡塔尔国 $youweb=$youweb;
else if (uinfo($youweb,web卡塔尔(قطر‎==OK&&substr($youweb,0,3卡塔尔(قطر‎==htt卡塔尔$youweb=$youweb; else $youweb=不告诉您;
$time=date(Y年n月j日G时i分卡塔尔(قطر‎;//取当前时刻
$message=str_replace(,,str_replace(,,$message));
$message=nl2br($message); $gip=getenv(REMOTE_ADD奥迪Q3卡塔尔(قطر‎;
$messages=$message.ㄞㄚㄓ.$youname.ㄞㄚㄓ.$youoicq.ㄞㄚㄓ.$youweb.ㄞㄚㄓ.$youmail.ㄞㄚㄓ.$youbq.ㄞㄚㄓ.$youaddr.ㄞㄚㄓ.$time.ㄞㄚㄓ.$gip.δεζ;
if($c==dd卡塔尔//如若是援引回复 { $messages=font color=’999999′.$mess.div
align=’center’★原来的书文……★……援引★/div/fontbr.$messages; } $fo=fopen($ft,aState of Qatar;
$fp=fputs($fo,$messages卡塔尔国; $query=update foxbbs set
hfnum=hfnum+1,hfname=’.$ft.’,hfusename=’.$youname.’,hfdate=’.$time.’
where id=’.$id.’; mesput($query,$use,$idState of Qatar; } } ? /head body
bgcolor=#FFFFFF ? $tem=$HTTP_COOKIE_VARS[FlyFoxNet];
$temp=explode(|,$tem); $cookiem=$temp[0];
$useinfo=cuser($cookiem,$action); if
(!$useinfo[0]){$useinfo[2]=游客; $usename=1;} $query=select mesname
from foxbbs where id=’.$id.’; $req=mysql_query($query); if ($req) {
$f=mysql_fetch_array($req); $mess=yy($f[0]); if
($message&&$action=add) { $ft=foxbbs/.$f[0]..bbs; if
(ord(substr($message,0,1))!=161) $message= .$message; for
($i=0;$i10;$i++) { if ($bq[$i]) $youbq=$bq[$i]; } if
($usename卡塔尔(قطر‎gr($ft,$message,$youname,$youmail,$youoicq,$youweb,$youaddr,$youbq,$id,$use,$mess,$c卡塔尔国;
else usehf($message,$useinfo,$id,$use,$ft,$mess,$cState of Qatar; } } else echo
script language=’JavaScript’
alert(‘张开文件破绽百出!或许服务器忙,请稍候再试!’卡塔尔国; /script; ? table
width=百分百 cellpadding=4 cellspacing=0 border=0 tr td height=20 div
align=right/div /td td height=20 width=75/td td height=20 width=75/td td
height=20 width=75/td td height=20 width=75/td /tr tr td height=20 div
align=right/div /td td height=20 width=一成 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狐网─狐网论坛─回复核心:?echo font
color=’ff0000′.$zt./font;?/font/div /td tddiv align=centera
href=foxbbs.phpimg src=images/index.gif width=70 height=20 border=0
align=middle/a/div /td td height=20 width=一成 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=十分一 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 !– var
submitcount=0; function checkSubmit(卡塔尔国 { if (submitcount == 0卡塔尔 {
submitcount++; return true; } else { if (submitcount0卡塔尔国{
alert(帖子已成功交付了,别急,等等!State of Qatar; return false; } } } function
check_com(State of Qatar{ if(document.form.youname.value.length ==0卡塔尔国{ submitcount–;
alert(名字不可能为空!快填上吗!卡塔尔(قطر‎; return false; }
if(document.form.youmail.value.length ==0卡塔尔国{ submitcount–;
alert(EMAIL不能够为空!快填上吧!卡塔尔国; return false; }
if(document.form.youoicq.value.length ==0卡塔尔(قطر‎{ submitcount–;
alert(OICQ无法为空!快填上吗!卡塔尔; return false; }
if(document.form.message.value.length == 0State of Qatar{ submitcount–;
alert(内容不能为空!卡塔尔; return false; } return true; } //– /script table
width=’五分四’ border=’0′ cellspacing=’0′ cellpadding=’0′
bgcolor=’#000000′ align=’center’ tr td table width=’100%’ border=’0′
cellspacing=’0′ cellpadding=’0′ tr bgcolor=’#006699′ tddiv
align=centerfont color=ffffff? echo font
color=’00ff00′.$useinfo[2]./font; ? 你正在复苏的宗旨是:[? echo $zt;
?]/font/div/td /tr tr bgcolor=’#eeeeee’ td form name=form
onSubmit=return check_com(State of Qatar method=postdiv align=center ? if
($usename卡塔尔国//不是注册客户就显得输入框输入游客新闻。 { echo 你的大名:input
onFocus=’this.select(State of Qatar’ style=’BACKGROUND-COLO汉兰达: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
type=’text’ name=’youname’ size=’30’ maxlength=’30’ value=’.$youname.’;
echo OICQ: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=’youoicq’ size=’16’ maxlength=’16’
value=’.$youoicq.’br; echo 来自哪里:input onFocus=’this.select(卡塔尔(قطر‎’
style=’BACKGROUND-COLOENCORE: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’youaddr’ size=’55’
value=’.$youaddr.’br; echo 电子信箱:input onFocus=’this.select(State of Qatar’
style=’BACKGROUND-COLOKuga: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’youmail’ size=’55’
value=’.$youmail.’br; echo 个人主页:input onFocus=’this.select(State of Qatar’
style=’BACKGROUND-COLO奇骏: #ffffff; BORDER-BOTTOM: #000000 1px dashed;
BORDER-LEFT: #000000 1px dashed; BORDER-RIGHT: #000000 1px dashed;
BORDER-TOP: #000000 1px dashed;’ type=’text’ name=’youweb’ size=’55’
value=’.$youweb.’br; echo 表情brinput type=’radio’ name=’bq[0]’
value=’a’img src=’images/a.gif’input type=’radio’ name=’bq[1]’
value=’1’img src=’images/1.gif’; echo input type=’radio’ name=’bq[2]’
value=’2’img src=’images/2.gif’input type=’radio’ name=’bq[3]’
value=’3’img src=’images/3.gif’; echo input type=’radio’ name=’bq[4]’
value=’4’img src=’images/4.gif’input type=’radio’ name=’bq[5]’
value=’5’img src=’images/5.gif’; echo input type=’radio’ name=’bq[6]’
value=’6’img src=’images/6.gif’input type=’radio’ name=’bq[7]’
value=’7’img src=’images/7.gif’; echo input type=’radio’ name=’bq[8]’
value=’8’img src=’images/8.gif’input type=’radio’ name=’bq[9]’
value=’9’img src=’images/9.gif’br; } echo div align=’center’回复内容br;
echo textarea onFocus=’this.select(State of Qatar’ style=’BACKGROUND-COLOWrangler: #ffffff;
BORDER-BOTTOM: #000000 1px dashed; BORDER-LEFT: #000000 1px dashed;
BORDER-RIGHT: #000000 1px dashed; BORDER-TOP: #000000 1px dashed;’
name=’message’ cols=’64’ rows=’5′ wrap=’VIRTUAL’.$message./textareabr; ?
input type=submit name=Submit value=确定 onClick=return checkSubmit()
input type=reset name=Submit2 value=重写/div/div/form /td /tr tr
bgcolor=’#eeeeee’//若是是援引原来的小说就显得 tddiv align=center? if ($c==dd卡塔尔(قطر‎echo 原来的书文如下brdiv align=’left’.$mess;?/div/td /tr /table /td /tr /table
/body /html

发表评论

电子邮件地址不会被公开。 必填项已用*标注