BBS(php & mysql)完整版(二)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了BBS(php & mysql)完整版(二),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含4491字,纯文字阅读大概需要7分钟。
内容图文
![BBS(php & mysql)完整版(二)](/upload/InfoBanner/zyjiaocheng/121/22b2c3393b7044b48f90bf6defd6727d.jpg)
<?
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>
内容总结
以上是互联网集市为您收集整理的BBS(php & mysql)完整版(二)全部内容,希望文章能够帮你解决BBS(php & mysql)完整版(二)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。
来源:【匿名】