<?php
/*____ Generate HTML file ________beign__________*/
if ($make _html)
{
$buffer = Ob_get_flush ();
if ($go _html)//whether directly to the HTML file display or PHP read content output (0:php read content Output 1: Direct turn)
{
/*__ handles the problem of the seed path caused by generating HTML files ______begin_______*/
$search = Array (
"/(src=|action=|href=|ajaxread\ () \"/ie ",
"/\.\.\./e",
"/\.\/\./e",
"/\.\.\/http:\/\//ies",
"/\.\.\/#/",
"/\ ' \.\ '/e",
"/\.\.\/javascript:/ies");
$replace = Array (
"' \\1\". /'",
"'..'",
"'.'",
"' http://'",
"#",
"'\'.. \''",
"' javascript: '");
$buffer = Preg_replace ($search, $replace, $buffer);
/*___ handles the problem of the seed path caused by generating HTML files _____end_____*/
}
$fp = fopen (html_file, "w");
if ($FP)
{
Fwrite ($fp, $buffer);
Fclose ($FP);
}
}
/*_______ Generate HTML file _________beign________*/
?>
<?php
Ob_start ();
/*____ determines whether an HTML file has been generated, and jumps to an HTML page if it is generated ___begin_____*/
$qstring = Isset ($_server["query_string"])? $_server["Query_string"]: "";
if ($qstring)//program adds a GET request processing
{
$qstring = str_replace ("=", "", $qstring);
Define ("Html_file", "./h/{$efilename}-{$qstring}.html");
}
Else
{
Define ("Html_file", "./h/{$efilename}.html");
}
if (file_exists (html_file))
{
$LCFT = Filemtime (html_file);//last Create FILE time
if ($LCFT + 3600) > Time ())//To determine whether the last generation of HTML file in the past 1 times, if not to output directly the contents of the file
{
if ($show _html)//is displayed in an HTML static page (0 does not show HTML display 1 with HTML display)
{
if ($go _html)//whether directly to the HTML file display or PHP read content output (0:php read content Output 1: Direct turn)
{
Header ("Location:"). html_file);/Direct turn
}
Else
{
Echo (file_get_contents (html_file));//Read exhibited
}
Exit (0);
}
}
}
/*___ determines whether an HTML file has been generated, and jumps to an HTML page if it is generated _____end_____*/
?>
<?php
Require ("woods-thtml.php");//Generate HTML Processing headers
if (count ($_get) < 1 && count ($_post) < 1) {require ("woods-thtml.php"); Generate HTML Processing headers
Require ("{$exec _file}");//Register language definition file
foreach ($lang as $key => $value)
{
$ATPL [Strtoupper ($key). " _lang "] = $value;
}
/*__________ list Common sense go up the item _______end_______*/
Include ("woods-templates.php");
$TPL = new Woodstpl ("./templates/");
$tpl->require_tpl ("header.html");
$tpl->set_file ();
$tpl->block ("Ebcorp", $scorp);
$tpl->block ("NEWS", $news);
$tpl->block ("PRODUCT", $product);
$tpl->block ("Ebpname_msg", $spname);
$tpl->block ("lore", $lore);
$tpl->require_tpl ("footer.html");
$tpl->parse ($ATPL, true);
$TPL = NULL;
/*_____ Template Operations ________end_____________*/
Require ("woods-bhtml.php");//Generate HTML processing tail
?>