BBS(php & mysql)完整版(二)

//此页面为look.php

  1<html>
  2<head>
  3<title>xiaoyang</title>
  4<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  5<?   
  6  
  7include "js/menuhead.php"   
  8?>
  9<script language="JavaScript">   
 10<!--   
 11function MM_reloadPage(init) { //reloads the window if Nav4 resized   
 12if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {   
 13document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}   
 14else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();   
 15}   
 16MM_reloadPage(true);   
 17// -->   
 18</script>
 19</head>
 20<body bgcolor="#FFFFFF" text="#000000">
 21<?   
 22  
 23include "js/menu.php";   
 24?>
 25<div id="Layer6" style="position:absolute; left:409px; top:29px; width:118px; height:17px; z-index:1"></div>
 26<div id="Layer5" style="position:absolute; left:63px; top:61px; width:464px; height:303px; z-index:2">
 27<table border="1" bordercolor="#FFCCFF" cellpadding="0" cellspacing="0" width="100%">
 28<tr>
 29<td height="17" width="22%">
 30<div align="center"><font color="#FF3399" size="2">题目</font></div>
 31</td>
 32<td height="17" width="78%">
 33<div align="center"><font color="#9966FF" size="2"><?echo $row["title"] ;?></font> </div>
 34</td>
 35</tr>
 36<tr>
 37<td height="24" width="22%">
 38<div align="center"><font color="#FF3399" size="2">作者</font></div>
 39</td>
 40<td height="24" width="78%">
 41<div align="center"><font color="#9966FF" size="2"><?echo $row["userid"] ;?></font> </div>
 42</td>
 43</tr>
 44<tr>
 45<td width="22%">
 46<div align="center"><font color="#FF3399" size="2">内容</font></div>
 47</td>
 48<td width="78%">
 49<div align="left"><font color="#9966FF" size="2"><? $file=explode("n",$row["content"]); $num=count($file);   
 50for($i=0 ;$i<$num;$i++) echo "&nbsp;&nbsp;".$file[$i]."<BR>";?&gt;</font></div>
 51</td>
 52</tr>
 53</table>
 54<?   
 55  
 56  
 57for($j=1;$j<6;$j++) //显示回复内容   
 58{   
 59$re="r".$j;   
 60if($row["$re"])   
 61{   
 62$id2=$row["$re"];   
 63$sql="select * from bbs_re where id='$id2'";   
 64$result=mysql_query($sql)or die(mysql_error());   
 65$row8=mysql_fetch_array($result);   
 66echo "<BR>";   
 67echo " <table border="1" bordercolor="#FFCCFF" cellpadding="0" cellspacing="0" width="100%"> <tr>";   
 68echo " <td height="17" width="22%"> <div align="center"><font color="#FF3399" size="2">题目</font></div>";   
 69echo " </td> <td height="17" width="78%">";   
 70echo " <div align="center"><font color="#9966FF" size="2">".$row8["title"]."</font> </div> </td> </tr> <tr>";   
 71echo "<td height="24" width="22%">";   
 72echo "<div align="center"><font color="#FF3399" size="2">作者</font></div></td>";   
 73echo " <td height="24" width="78%">";   
 74echo "<div align="center"><font color="#9966FF" size="2">".$row8["userid"]." </font> </div></td> </tr><tr>";   
 75echo " <td width="22%"><div align="center"><font color="#FF3399" size="2">内容</font></div>";   
 76echo "</td> <td width="78%">";   
 77echo "<div align="left"><font color="#9966FF" size="2">"; $file=explode("n",$row8["content"]);   
 78$num=count($file);   
 79for($i=0 ;$i&lt;$num;$i++) echo "  ".$file[$i]."<br/>";   
 80echo "</font></div>";   
 81echo " </td> </tr> </table>";   
 82}   
 83}   
 84  
 85?&gt;   
 86  
 87<br/><br/>
 88</div>
 89<div id="back" style="position:absolute; left:455px; top:30px; width:85px; height:3px; z-index:3">
 90<hr color="#ff9999" noshade=""/>
 91</div>
 92<div id="goback" style="position:absolute; left:461px; top:23px; width:120px; height:16px; z-index:2">
 93<div align="center"><a href="php3.php?p=1&amp;&amp;table=&lt;?echo $table ;?&gt;" onmouseover="window.status=''; return true" target="_self"><font color="#FF33FF" size="2">返回</font></a></div>
 94</div>
 95<div id="Lay" style="position:absolute; left:70px; top:30px; width:85px; height:3px; z-index:4">
 96<hr color="#ff9999" noshade=""/>
 97</div>
 98<div id="Laye" style="position:absolute; left:78px; top:23px; width:120px; height:16px; z-index:1">
 99<div align="center"><a &&table=".$table ;?&gt;" href="say.php?id1=&lt;? echo $id." onmouseover="window.status='';return true" target="_self"><font color="#FF33FF" size="2">回复</font></a></div>
100</div>
101<p> </p>
102<p> </p>
103</body>
104</html>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus