sp;print '<td width="53%"> '.$tempstr.'</td>';
// print '<td width="48%">'.$row["title"].'</td>';
print '<td width="9%"> '.$row["createman"].'</td>';
print '<td width="5%"><div align="center">'.$row["replycount"].'</td>';
$temptime = substr($row["replytime"],5,11);
print '<td width="11%"> '.$temptime.'</td>';
print '<td width="10%"> '.$row["replyman"].'</td>';
print '</tr>';
}
print "</table>";
//打印表尾
print '<table width="100%" border="0">';
print '<tr class="text"> <td width="50%"> <div align="center">';
if ($offset <> 1) { //如果偏移量是0,不显示前一页的链接
$newoffset=$offset - 1;
print "<a href='$PHP_SELF?offset=$newoffset'>前一页</a>";
} else {
print "前一页";
print " ";
}
//计算总共需要的页数
for ($i=1; $i <= $pages; $i++) {
$temps = "<a href='".$PHP_SELF.'?offset='.$i."'>".$i."</a>";
print $temps;
print " ";
}
//检查是否是最后一页
if ($pages!=0 && $offset!=$pages) {
$newoffset=$offset+1;
print "<a href='$PHP_SELF?offset=$newoffset'>下一页</a>";
} else print "下一页";
print '</div> </td>';
print '<td width="50%"> <div align="center">';
print "当前页:".$offset." 共".$pages."页";
print '</div> </td>';
print "</table>";
//end of 打印表尾
?>
<?
include ("c:mydbfooter.inc");
?>
</body>
</html>
【本文版权归作者zhangcg与奥索网共同拥有,如需转载,请注明作者及出处】
上一页 [1] [2]