get_one(" SELECT * FROM {$pre}channel WHERE id='$ch' "); $head_tpl=$chdb[head_tpl]; $foot_tpl=$chdb[foot_tpl]; $chdb[style] && $STYLE=$chdb[style]; //頻道定義了風格將以頻道為主 //其他頻道的SEO if($chdb[id]!=1) { $titleDB[title]="$chdb[name] - $titleDB[title]"; $titleDB[keywords]=$titleDB[description]="$titleDB[title] - $titleDB[keywords]"; } /** *自動訪問靜態首頁,處理有的服務器,index.php的訪問優先于index.htm,或index.html **/ if($webdb[MakeIndexHtmlTime]>0&&!$MakeIndex&&!$jobs&&is_file(PHP168_PATH.$chdb[htmlname])){ header("location:$webdb[www_url]/$chdb[htmlname]"); exit; } /** *fid欄目FID定為0,pagetype頁面類型定義0(其實為1的,省略方便些),module定義為0 **/ $ch_fid = $ch_pagetype = $ch_module = 0; require(PHP168_PATH."inc/label.php"); /** *首頁顯示推薦欄目 **/ if($chdb[fids]) { $chdb[config]=unserialize($chdb[config]); $fiddb_article=fiddb_article($chdb[fids],$chdb[config][rows]>0?$chdb[config][rows]:10,$chdb[config][leng]>0?$chdb[config][leng]:40,$chdb[config][order]?$chdb[config][order]:'list'); $fiddb_article || $fiddb_article=array(); } require(PHP168_PATH."inc/head.php"); require(html("index",$chdb[main_tpl])); require(PHP168_PATH."inc/foot.php"); //偽靜態 if($webdb[NewsMakeHtml]==2) { $content=ob_get_contents(); ob_end_clean(); ob_start(); $content=fake_html($content); echo "$content"; } //真靜態 elseif($webdb[NewsMakeHtml]==1) { $content=ob_get_contents(); ob_end_clean(); ob_start(); //備用 $content=make_html($content,'index'); echo "$content"; } /*首頁生靜態*/ if( ($jobs!='show'&&$webdb[MakeIndexHtmlTime]>0) || $MakeIndex ) { if( $MakeIndex || (time()-@filemtime($chdb[htmlname])-$webdb[MakeIndexHtmlTime]*60)>0 ) { $webdb[MakeIndexHtmlTime] && $content.="
"; write_file($chdb[htmlname],$content); if($MakeIndex) { ob_end_clean(); echo ""; exit; } } } ?>