PHP
·
发表于 5年以前
·
阅读量:8294
//此页面为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());
?>
include "js/menuhead.php"
?>
include "js/menu.php";
?>
<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 "
";
echo "
题目 ";echo " | "; echo " ".$row8["title"]." |
"; echo " 作者 | ";"; echo " ".$row8["userid"]." |
内容 ";echo " | "; echo " "; $file=explode("n",$row8["content"]); ";$num=count($file); for($i=0 ;$i<$num;$i++) echo " ".$file[$i]." "; echo " echo " |
?>