建站极客
网络编程 PHP编程 正文
BBS(php & mysql)完整版(二)
所属分类:
网络编程 / PHP编程
阅读数:
1925
收藏 0
赞 0
分享
//此页面为look.php <? include "signup/mysql.inc"; $sql="select * from ".$table." where id='$id'"; $result=mysql_query($sql)or die(mysql_error()); $row=mysql_fetch_array($result); $number=++$row["number"]; $sql="update $table set number='$number' where id='$id'"; mysql_query($sql)or die(mysql_error()); ?> <html> <head> <title>xiaoyang</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <? include "js/menuhead.php" ?> <script language="JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // --> </script> </head> <body bgcolor="#FFFFFF" text="#000000"> <? include "js/menu.php"; ?> <div id="Layer6" style="position:absolute; left:409px; top:29px; width:118px; height:17px; z-index:1"></div> <div id="Layer5" style="position:absolute; left:63px; top:61px; width:464px; height:303px; z-index:2"> <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#FFCCFF"> <tr> <td width="22%" height="17"> <div align="center"><font color="#FF3399" size="2">题目</font></div> </td> <td width="78%" height="17"> <div align="center"><font size="2" color="#9966FF"><?echo $row["title"] ;?></font> </div> </td> </tr> <tr> <td width="22%" height="24"> <div align="center"><font color="#FF3399" size="2">作者</font></div> </td> <td width="78%" height="24"> <div align="center"><font size="2" color="#9966FF"><?echo $row["userid"] ;?></font> </div> </td> </tr> <tr> <td width="22%"> <div align="center"><font color="#FF3399" size="2">内容</font></div> </td> <td width="78%"> <div align="left"><font size="2" color="#9966FF"><? $file=explode("n",$row["content"]); $num=count($file); for($i=0 ;$i<$num;$i++) echo " ".$file[$i]."<BR>";?></font></div> </td> </tr> </table> <? for($j=1;$j<6;$j++) //显示回复内容 { $re="r".$j; if($row["$re"]) { $id2=$row["$re"]; $sql="select * from bbs_re where id='$id2'"; $result=mysql_query($sql)or die(mysql_error()); $row8=mysql_fetch_array($result); echo "<BR>"; echo " <table width=100% border=1 cellspacing=0 cellpadding=0 bordercolor=#FFCCFF> <tr>"; echo " <td width=22% height=17> <div align=center><font color=#FF3399 size=2>题目</font></div>"; echo " </td> <td width=78% height=17>"; echo " <div align=center><font size=2 color=#9966FF>".$row8["title"]."</font> </div> </td> </tr> <tr>"; echo "<td width=22% height=24>"; echo "<div align=center><font color=#FF3399 size=2>作者</font></div></td>"; echo " <td width=78% height=24>"; echo "<div align=center><font size=2 color=#9966FF>".$row8["userid"]." </font> </div></td> </tr><tr>"; echo " <td width=22%><div align=center><font color=#FF3399 size=2>内容</font></div>"; echo "</td> <td width=78%>"; echo "<div align=left><font size=2 color=#9966FF>"; $file=explode("n",$row8["content"]); $num=count($file); for($i=0 ;$i<$num;$i++) echo " ".$file[$i]."<BR>"; echo "</font></div>"; echo " </td> </tr> </table>"; } } ?> <BR><BR> </div> <div id="back" style="position:absolute; left:455px; top:30px; width:85px; height:3px; z-index:3"> <hr color="#ff9999" noshade> </div> <div id="goback" style="position:absolute; left:461px; top:23px; width:120px; height:16px; z-index:2"> <div align="center"><a href="php3.php?p=1&&table=<?echo $table ;?>" target="_self" onMouseOver="window.status=''; return true"><font size="2" color="#FF33FF">返回</font></a></div> </div> <div id="Lay" style="position:absolute; left:70px; top:30px; width:85px; height:3px; z-index:4"> <hr noshade color="#ff9999"> </div> <div id="Laye" style="position:absolute; left:78px; top:23px; width:120px; height:16px; z-index:1"> <div align="center"><a href="say.php?id1=<? echo $id."&&table=".$table ;?>" target="_self" onMouseOver="window.status='';return true"><font size="2" color="#FF33FF">回复</font></a></div> </div> <p> </p> <p> </p> </body> </html>
两种php去除二维数组的重复项方法 这篇文章主要介绍了两种php去除二维数组的重复项方法,大家可以进行比较看哪一种更适合自己,需要的朋友可以参考下
评论 0
收藏 0
赞 0
分享
php实现网站留言板功能 这篇文章主要介绍了php实现网站留言板功能,主要仿照了畅言留言板和网易跟帖样式进行制作,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
评论 0
收藏 0
赞 0
分享
PHP实现HTML页面静态化的方法 这篇文章主要介绍了PHP实现HTML页面静态化的方法,分享了静态处理的方法,静态处理后的优势,并提供了多种静态的方法,感兴趣的小伙伴们可以参考一下
评论 0
收藏 0
赞 0
分享
php对文件夹进行相关操作(遍历、计算大小) 这篇文章主要介绍了php对文件夹进行相关操作,包括遍历并打印指定目录下所有文件和计算文件大小去空白,以及去重复值等,感兴趣的小伙伴们可以参考一下
评论 0
收藏 0
赞 0
分享
非常全面的php日期时间运算汇总 这篇文章主要整理了关于php日期时间运算相关内容,涉及知识点较为全面,感兴趣的小伙伴们可以参考一下
评论 0
收藏 0
赞 0
分享
php根据用户语言跳转相应网页 这篇文章主要介绍了php根据用户语言跳转相应网页的方法,主要区分国内国外,感兴趣的小伙伴们可以参考一下
评论 0
收藏 0
赞 0
分享
双冒号 ::在PHP中的使用情况 前几天在百度知道里面看到有人问PHP中双冒号::的用法,当时给他的回答比较简洁因为手机打字不大方便!今天突然想起来,所以在这里总结一下我遇到的双冒号::在PHP中使用的情况
评论 0
收藏 0
赞 0
分享
查看更多