- 爱易网页
-
PHP教程
- 模仿OSO的论坛(二)
日期:2012-12-29 浏览次数:20467 次
read.php(用来显示相关主题内容)
<HTML><HEAD><TITLE>疑难问题</TITLE>
<LINK href="mypic/style.css" rel=STYLESHEET type=text/css></HEAD>
<BODY bgColor=#cccc99 bottomMargin=0 leftMargin=0 topMargin=0 marginwidth="0" marginheight="0">
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" class=body_br >
<TBODY>
<TR>
<TD vAlign=top><BR>
<TABLE align=center border=0 cellPadding=3 cellSpacing=0 width=100%>
<TBODY>
<TD>主 题:<FONT class=mid
color=#993333><B>
<?php
include "connect.inc.php";
$query = "select * from guestbook where id=".$theme_id;
$res = mysql_query($query);
$row = mysql_fetch_array($res);
echo $row['theme'];
?>
</B></FONT></TD></tr><tr>
<TD align=middle vAlign=top width=100%><A
href="post.php"><IMG
border=0 src="http://edu.cnzz.cn/NewsInfo/mypic/post.gif"></A>
<A href="reply.php?theme_id=<?php echo $row['id'] ?>"><IMG
border=0
src="http://edu.cnzz.cn/NewsInfo/mypic/reply.gif"></A> <A
href="faq.php?page=1"><IMG
border=0
src="mypic/theme.gif"></A></TD></TR>
<?php
if ($row['answer_count']>5)
{echo "<TR> <TD>分 页:<FONT class=mid >";
for ($j=1;$j<=($row['answer_count']-1)/5+1;$j++) {
if ($j==$page) echo "<FONT color=#999999> [".$j."]</FONT> </A>";
else echo "<A href='read.php?theme_id=".$row['id']."&page=".$j."'[".$j."]</FONT> </A>";
}}
echo " 共有帖子".$row['answer_count']."个</TD>";
$this_id=$row['id'];
$query = "select id from guestbook where id<".$this_id." and type=1 order by id DESC";
$res = mysql_query($query);
$row = mysql_fetch_row($res);
$pre_id=$row[0];
$query = "select id from guestbook where id>".$this_id." and type=1 order by id";
$res = mysql_query($query);
$row = mysql_fetch_row($res);
$next_id=$row[0];
?>
</TR>
</TBODY></TABLE>
<TABLE align=center border=0 cellPadding=4 cellSpacing=2 width=100%>
<TBODY>
<TR>
<TD align=middle bgColor=#6f6f6f width="20%"><FO
免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。