<?php require_once('inc/config.php'); 
require_once('inc/global.php'); 
require_once('replace.php'); 
include("inc/function.php"); 
ob_start( ); 
$htmlurl = "index".$houzhui; 
$htmlmulu = "/".$erji."/"; 
if ( $cache == "on" && $cachetimea != "0"){
define( "HTML_FILE", $_SERVER['DOCUMENT_ROOT'].$htmlmulu.$htmlurl );
if ( file_exists( HTML_FILE )){$lcft = filemtime( HTML_FILE );
if ( time( ) < $lcft + ($cachetimea*3600) ){echo file_get_contents( HTML_FILE );
exit( 0 );
}}
include_once ("rules/index.php");
include_once( "templets/".$template."/index.pl" ); 
if($body == ""){echo '<div align=center>未采集到数据，请联系管理员</div>';
exit();
}
define( "HTMLMETA", "" );
$buffer = ob_get_flush( );
$fp = fopen( HTML_FILE, "w+" );
chmod( HTML_FILE, 511 );
if ( $fp ){fwrite( $fp, $buffer.HTMLMETA );
fclose( $fp );
}} else {
include_once ("rules/index.php");
require_once( "templets/".$template."/index.pl" );
}
?>

