📄 listzhai.php
字号:
<? include("conn.php");?>
<? include("include/function.php");?>
<? include("include/setup.php");?>
<? include("head.php");?>
<?
$listtype=$_GET[type];
if($listtype=="hot24"){
$days=1;
}elseif($listtype=="hot48"){
$days=2;
}elseif($listtype=="week"){
$days=7;
}
?>
<table width="770">
<tr>
<td><table width="500" height="27" border="0" cellpadding="0" cellspacing="0">
<tr align="center">
<td width="80" class="<? if($listtype=="hot24"){ echo("bgtitlen"); }else{ echo("bgtitley"); };?>"><a href="listzhai.php?type=hot24">24小时排行</a></td>
<td width="80" class="<? if($listtype=="hot48"){ echo("bgtitlen"); }else{ echo("bgtitley") ;};?>"><a href="listzhai.php?type=hot48">48小时排行</a></td>
<td width="80" class="<? if($listtype=="week"){ echo("bgtitlen"); }else{ echo("bgtitley"); };?>"><a href="listzhai.php?type=week">周热点排行</a></td>
<td width="80" class="<? if($listtype=="new"){ echo("bgtitlen"); }else{ echo("bgtitley"); };?>"><a href="listzhai.php?type=new">最 新 收 藏</a></td>
<td width="80" class="bgtitley"><a href="myzhai.php">我 的 收 藏</a></td>
<td class="bgtail"> </td>
</tr>
</table></td>
<td width="60"><a href="jsfeed.php" target="_blank"><img src="images/icon-js.gif" alt="JS格式输出" width="26" height="14" border="0"></a> <a href="rss2feed.php" target="_blank"><img src="images/icon-rss.gif" alt="RSS格式输出" width="26" height="14" border="0"></a></td>
</tr>
</table>
<table width="770" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td><table width="100%" border="0" cellspacing="3">
<?
$rcperpage=30;
$page=$_GET[page];
if(!$page){
$page=1;
}
if($listtype=="new"){
$sql="select id, title,userid,fromurl, intro from zhai where ispub='1' order by id desc limit ".trim(($page-1)*$rcperpage).",$rcperpage";
$tsql="select count(*) as c from zhai where ispub='1' ";
}else{
$sql="select id, title,userid,fromurl, intro from zhai where ispub='1' order by id desc limit ".trim(($page-1)*$rcperpage).",$rcperpage";
$tsql="select count(*) as c from zhai where ispub='1' ";
}
$pgcount=$_GET[pacount];
if(!$pgcount){
$tqr=mysql_query($tsql);
$total=mysql_fetch_array($tqr);
$pgcount=floor((chop($total[0])-1)/$rcperpage)+1;
}
$query=mysql_query($sql);
while($rs=mysql_fetch_array($query)){
if($rs[htm]=="y"){$url="html/".$rs[id]."/index.htm";}else{$url="zhaishow.php?id=".$rs[id]."";}
echo("<tr>");
echo("<td><span class='grayscript'>·</span><a href='$url' target='_blank' title='".$rs[intro]."'>".$rs[title]."</a> <span class='other'>(<a href='userzhai.php?zhaiuser=".$rs[userid]."'>".$rs[userid]."</a> ");
if($rs[fromurl]!=""){
echo("收藏)</span> <a href=".$rs[fromurl]." target='_blank'><img src='images/icon-link.gif' border='0' alt='信息链接'></a></td>");
}
else
{
echo("收藏)</span></td>");
}
$row=$row+1;
echo("</tr>");
}
if($row<$rcperpage){
for($i=0;$i<($rcperpage-$row);$i++){
echo("<tr>");
echo("<td> </td>");
echo("</tr>");
}
}
;?>
<tr align="right">
<td></br>第 <? echo $page;?> 页 共 <? echo $pgcount;?> 页
<?
if($page>1){
echo(" <a href='listzhai.php?type="&listtype&"&page=1;'>第一页</a>");
echo(" <a href='listzhai.php?type="&listtype&"&pgcount=$pgcount&page=".($page-1)."'>上一页</a>");
}else{
echo(" 第一页");
echo(" 上一页");
}
if($page < $pgcount){
echo(" <a href='listzhai.php?type="&listtype&"&pgcount=$pgcount&page=".($page+1)."'>下一页</a>");
echo(" <a href='listzhai.php?type="&listtype&"&pgcount=$pgcount&page=".$pgcount."'>最末页</a>");
}else{
echo(" 下一页");
echo(" 最末页");
}
;?>
</td>
</tr>
</table></td>
<td> </td>
</tr>
</table>
<? include("bottom.php");?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -