📄 showdis.php
字号:
<link href="css.css" rel="stylesheet" type="text/css">
<?
include('config.php');
include_once('function.php');
mysql_select_db($dbname);
$time_id=$_GET[time_num];
$count=$_GET[count];
$lim=5;
//$query_top="select * from discuss_text where discuss_time_id=$time_id and discuss_title='".$title->discuss_title."'";
//$text=mysql_fetch_object(mysql_query($query_top,$link));
//echo $text->discuss_title." ".$text->discuss_text."<BR>";
$query_re="select * from discuss_text where discuss_time_id=$time_id order by discuss_time limit $count, $lim";
$result=mysql_query($query_re,$link);
$allnum=mysql_affected_rows($link);
echo mysql_error();
if ($count-$lim>=0)
{
$count_b=$count-$lim;
$befor="<a href='showdis.php?count=$count_b&time_num=$time_id'>上一页</a>";
}
else
$befor="上一页";
if ($allnum-$count>=$lim)
{
$count_n=$count+$lim;
$next="<a href='showdis.php?count=$count_n&time_num=$time_id''>下一页</a>";
}
else
$next="下一页";
?>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" background="images/dmid.jpg" class="tianchong"><font class="size10">察看讨论(此处大家可见)
</font></td>
</tr>
<tr>
<td width="63%" class="tianchong"><a href="adddiscu.php?time_num=<?=$time_id?>&count=<?=$count?>">发起新话题</a>
| <a href="replay.php?time_num=<?=$time_id?>&count=<?=$count?>">参加讨论(回复)</a></td>
<td width="37%" class="tianchong"><font color="#000000">
<?=$befor?>
</font> |
<?=$next?>
| <font class="size10"><a href="modpage.php?mod=discuss&count=<?=$count?>">返回</a></font>
</td>
</tr>
<tr>
<td colspan="2" class="tianchong">
<?
while($show=mysql_fetch_object($result))
{
$title=$show->discuss_title;
$dis_text=$show->discuss_text;
$name=$show->worker_login_name;
$time=$show->discuss_ftime;
$query_info="select discuss_num from worker where login_name='".$name."'";
$info=mysql_fetch_object(mysql_query($query_info));
$info="讨论热情: ".$info->discuss_num;
if($show->discuss_title!="")
require('template/showdiscuss.php');
else require('template/showdiscuss_so.php');
}?>
</td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -