📄 index.php
字号:
<? include("conn.php");?>
<? include("include/function.php");?>
<? include("include/setup.php");?>
<? include("include/file.php");?>
<?
$rcperpage=10; //每页显示数
//站点类别导航
$sql="select * from type order by rand() ";
$qr=mysql_query($sql);
while($typedb=mysql_fetch_array($qr)){
$i=$i+1;
$sort[$typedb[id]]=$typedb[typename];
if($i<13){
$sql="select * from zhai where typeid='$typedb[id]' and ispub='1' order by isgood desc,rand() limit 15";
$qr1=mysql_query($sql);
while($data=mysql_fetch_array($qr1)){
if(file_exists("html/".$data[id]."/index.htm")){$data[url]="html/".$data[id]."/index.htm";}else{$data[url]="zhaishow.php?id=".$data[id]."";}
$data[title]=sub($data[title],44);
$data[typename]=$typedb[typename];
$zhailist[$typedb[id]][]=$data;
}
}
//精彩图片推荐
$sql="select * from zhai where typeid='$typedb[id]' and picname!='' and ispub='1' order by isgood desc,rand() limit 9";
$qr1=mysql_query($sql);
while($data=mysql_fetch_array($qr1)){
if(file_exists("html/".$data[id]."/index.htm")){$data[url]="html/".$data[id]."/index.htm";}else{$data[url]="zhaishow.php?id=".$data[id]."";}
$data[picname]=$data[picname];
$data[title]=sub($data[title],22);
$piclist[$typedb[id]][]=$data;
}
$type[]=$typedb;
}
//幻灯效果
$sql="select * from zhai where picname!='' and huandeng='1' order by isgood desc,rand() limit 10";
$qr1=mysql_query($sql);
while($data=mysql_fetch_array($qr1)){
$o=$o+1;
if(file_exists("html/".$data[id]."/index.htm")){$data[url]="html/".$data[id]."/index.htm";}else{$data[url]="zhaishow.php?id=".$data[id]."";}
$data[title]=sub($data[title],22);
$toppic[]=$data;
}
/*//收藏排行
$sql="select * from zhai where picname!='' and huandeng='1' order by isgood desc,rand() limit 10";
$qr1=mysql_query($sql);
while($data=mysql_fetch_array($qr1)){
$o=$o+1;
if(file_exists("html/".$data[id]."/index.htm")){$data[url]="html/".$data[id]."/index.htm";}else{$data[url]="zhaishow.php?id=".$data[id]."";}
$data[title]=sub($data[title],22);
$toppic[]=$data;
}
$sql="select *,count(fromurl) as tt from zhai where ispub='1' group by fromurl order by tt desc limit 10";
$query=mysql_query($sql);
while($rs=mysql_fetch_array($query)){
$rs[title]=sub($rs[title],36);
if(file_exists("html/".$rs[id]."/index.htm")){$rs[url]="html/".$rs[id]."/index.htm";}else{$rs[url]="zhaishow.php?id=".$rs[id]."";}
$rs[posttime]=date("m.d",$rs[posttime]);
$shoulu[]=$rs;
}
//热门标签
*/
//今日精粹
$sql="select * from zhai where ispub='1' order by isgood desc,rand() limit 12";
$query=mysql_query($sql);
while($rs=mysql_fetch_array($query)){
$rs[title]=sub($rs[title],40);
if(file_exists("html/".$rs[id]."/index.htm")){$rs[url]="html/".$rs[id]."/index.htm";}else{$rs[url]="zhaishow.php?id=".$rs[id]."";}
$goodzhai[]=$rs;
}
//最新网摘
$sql="select * from zhai where ispub='1' order by incount desc limit 12";
$query=mysql_query($sql);
while($rs=mysql_fetch_array($query)){
$rs[title]=sub($rs[title],40);
if(file_exists("html/".$rs[id]."/index.htm")){$rs[url]="html/".$rs[id]."/index.htm";}else{$rs[url]="zhaishow.php?id=".$rs[id]."";}
$rs[typename]=$sort[$rs[typeid]];
$newzhai[]=$rs;
}
$readtpl='index';
$db_obstart==1 ? ob_start('ob_gzhandler') : ob_start();
require_once(PrintEot($readtpl));
$content=ob_get_contents();
writeover("index.htm",$content,"rb+",0);
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -