read.php(用来表示相关主题内容) 疑难问题 主题: color=#993333> include "connect.inc.php"; $query = "select * from guestbook where id=".$theme_id; $res = mysql_query($query); $row = mysql_fetch_array($res); echo $row['テーマ']; ?> href="post.php"> border=0 src="mypic/post.gif "> border=0 src="mypic/ Reply.gif"> href="faq.php?page=1"> border=0 src="mypic/theme.gif"> TD> if ($row['answer_count']>5) {echo " 分页:"; for ($j=1;$j<=($row['answer_count']-1)/5 1;$j ) { if ($j==$page) echo " [".$j."]"; else echo ""; }} echo " 共通帖子".$row['answer_count']."个"; $this_id=$row['id']; $query = "ID$res = mysql_query($query); $row = mysql_fetch_row($res); $pre_id=$row[0]; $query = "id>".$this_id." のゲストブックから ID を選択し、type=1 ID で並べ替えます"; $res = mysql_query($query); $row = mysql_fetch_row($res); $next_id=$row[0]; ?> 作 者 内 容 $query = "select * from guestbook where main_id=".$theme_id." or id=".$theme_id." order by time_open DESC limit ".strval(($page-1 )*5).",5"; $res = mysql_query($query); function TdBackColor() { static $ColorStr; if ($ColorStr=="#ededed") { $ColorStr="#ededed"; } else { $ColorStr="#ededed"; } return($ColorStr); } for ($i=1;$i<=5;$i ) {$row = @mysql_fetch_array($res); if(!$row) ブレーク; $ColorStr=TdBackColor(); エコー ""; echo "echo "class=mid>"; echo $row['name'].""; echo ""; echo ""; エコー「」; エコー ""; echo " echo " src='mypic/icon".$row['icon'].".gif'>"; echo "発行表: ".$row['time_open'].""; echo " "; エコー ""; エコー ""; エコー ""; echo "".$row['content'].""; エコー " "; }?> href="read.php?theme_id=&page=1"> color=#ffffff>上一人の主 href="read.php?theme_id=&page=1"> color=#ffffff>次の主题