📄 index.php
字号:
<?php
if(is_file('install.php')){
header("location:install.php");exit;
}
require("global.php");
require(PHP168_PATH."php168/friendlink.php");
//SEO
$titleDB[title] = "$webdb[Mv_webname] - $titleDB[title]";
$titleDB[keywords] = $titleDB[description] = "$webdb[Mv_webname] - $webdb[Mv_metakeywords] - $titleDB[keywords]";
$ch_fid = $ch_pagetype = 0;
$ch_module = $webdb[module_id]?$webdb[module_id]:3;
@include(PHP168_PATH."inc/label_module.php");
$listdb_moresort=ListMoreSort($moresortROWS>0?$moresortROWS:8,$moresortLeng>0?$moresortLeng:40);//大分类
require("head.php");
require(getTpl("index"));
require("foot.php");
//伪静态处理
unset($content);
if($webdb[Mv_NewsMakeHtml]==2)
{
$content=ob_get_contents();
ob_end_clean();
ob_start();
$content=fake_html($content);
echo "$content";
}
elseif($webdb[Mv_NewsMakeHtml]==1)
{
$content=ob_get_contents();
ob_end_clean();
ob_start(); //备用
$content=make_html($content,'index');
echo "$content";
}
if( ($jobs!='show'&&$webdb[Mv_MakeIndexHtmlTime]>0)||$MakeIndex)
{
if($MakeIndex||(time()-@filemtime("index.htm")-$webdb[Mv_MakeIndexHtmlTime]*60)>0){
if(!$content){
$content=ob_get_contents();
}
ob_end_clean();
$content=str_replace("</body>","<div style='display:none'><iframe src=job.php?job=makeindex></iframe></div></body>",$content);
write_file("index.htm",$content);
echo "<META HTTP-EQUIV=REFRESH CONTENT='0;URL=index.htm'>";
exit;
}
}
function ListMoreSort($rows,$leng){
global $db,$pre,$fid;
$query=$db->query("SELECT * FROM {$pre}mv_sort WHERE index_show=1 ORDER BY list DESC");
while($rs=$db->fetch_array($query)){
$SQL="WHERE fid=$rs[fid] AND yz=1 ORDER BY list DESC LIMIT $rows";
$which='*';
$rs[article]=list_content($SQL,$which,$leng);
//如果本栏目不能获取到内容,将获取其所有子栏目的内容
if(!$rs[article])
{
$array_fid=Get_SonFid("{$pre}mv_sort",$rs[fid]);
if($array_fid)
{
$SQL="WHERE fid IN (".implode(',',$array_fid).") ORDER BY list DESC LIMIT $rows";
$rs[article]=list_content($SQL,$which,$leng);
}
}
$rs[logo] && $rs[logo]=tempdir($rs[logo]);
$listdb[]=$rs;
}
return $listdb;
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -