Copy codeThe Code is as follows:
<? Php
//////////////////////////////////////// ///////////////////////////////////////
//
// Zhang Shulin-Huijia Studio
//
// Module Name: woods-bhtml.php
// Abstract: generate the end of the Static HTML processing program
// Version 2.0
// Date 1006-11-25
// Author: woods · zhang
// Website: http://www.hoojar.com/
// Email: hoojar@53.com
// MSN: hoojar@hotmail.com
// Copyright 1001-1006, Hoojar studio All Rights Reserved
//
// Copyright 1001-1006, all rights reserved by Huijia Studio
// The software for free software, allowing use, copy,
// Modify and distribute the software and files. Any
// Use of this software must place a copy of all
// Above copyright notice. By the software Huijia studio
// Maintenance, if you have any queries please contact us.
// Thank you.
//
// This software is a free software that allows the use, copying, modification, and distribution of the software and its documentation.
// All copies of the above copyright notice shall appear wherever the software is used. This software is developed
// Maintain Huijia studio. If you have any questions, please contact us. Thank you for using it.
//
//////////////////////////////////////// ///////////////////////////////////////
// This file can only be loaded at the end of the program
/* ________________ Generate the HTML file ______________________ beign ________________________________*/
If ($ make_html)
{
$ Buffer = ob_get_flush ();
If ($ go_html) // whether to directly convert to HTML file display or PHP read content output (0: php read content output 1: directly convert)
{
/* __________ Handle the path problem arising from the generation of 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 );
/* __________ Handle the path problem arising from the generation of HTML files ____________________ end _______________*/
}
$ Fp = fopen (HTML_FILE, "w ");
If ($ fp)
{
Fwrite ($ fp, $ buffer );
Fclose ($ fp );
}
}
/* ________________ Generate the HTML file ______________________ beign ________________________________*/
?>
<? Php
//////////////////////////////////////// ///////////////////////////////////////
//
// Zhang Shulin-Huijia Studio
//
// Module Name: woods-thtml.php
// Abstract: generate a static HTML processing program Header
// Version 2.0
// Date 1006-11-25
// Author: woods · zhang
// Website: http://www.hoojar.com/
// Email: hoojar@53.com
// MSN: hoojar@hotmail.com
// Copyright 1001-1006, Hoojar studio All Rights Reserved
//
// Copyright 1001-1006, all rights reserved by Huijia Studio
// The software for free software, allowing use, copy,
// Modify and distribute the software and files. Any
// Use of this software must place a copy of all
// Above copyright notice. By the software Huijia studio
// Maintenance, if you have any queries please contact us.
// Thank you.
//
// This software is a free software that allows the use, copying, modification, and distribution of the software and its documentation.
// All copies of the above copyright notice shall appear wherever the software is used. This software is developed
// Maintain Huijia studio. If you have any questions, please contact us. Thank you for using it.
//
//////////////////////////////////////// ///////////////////////////////////////
// This file can only be loaded at the beginning of the program
Ob_start ();
/* ___________ Determine whether an HTML file has been generated. If an HTML file has been generated, the page will jump to the HTML page ___________ begin __________*/
$ Qstring = isset ($ _ SERVER ["QUERY_STRING"])? $ _ SERVER ["QUERY_STRING"]: "";
If ($ qstring) // The program adds 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 () // determines whether the last HTML file was generated for the past 1 time. if not, the file content is output directly.
{
If ($ show_html) // whether to display static HTML pages (0 is not displayed in HTML, 1 is displayed in html)
{
If ($ go_html) // whether to directly convert to HTML file display or PHP read content output (0: php read content output 1: directly convert)
{
Header ("Location:". HTML_FILE); // directly convert
}
Else
{
Echo (file_get_contents (HTML_FILE); // read display
}
Exit (0 );
}
}
}
/* ___________ Determine whether an HTML file has been generated. If an HTML file is generated, the page will jump to the HTML page ___________ end __________*/
?>
<? Php
//////////////////////////////////////// ///////////////////////////////////////
//
// Zhang Shulin-Huijia Studio
//
// Module Name: index. php
// Abstract: Home Page Information
// Version 1.0
// Date 2006-11-7
// Author: woods · zhang
// Website: http://www.hoojar.com/
// Cemail: hoojar@163.com
// MSN: hoojar@hotmail.com
// Copyright 2001-2006, Hoojar studio All Rights Reserved
//
// Copyright 2001-2006, all rights reserved by Huijia Studio
// The software for free software, allowing use, copy,
// Modify and distribute the software and files. Any
// Use of this software must place a copy of all
// Above copyright notice. By the software Huijia studio
// Maintenance, if you have any queries please contact us.
// Thank you.
//
// This software is a free software that allows the use, copying, modification, and distribution of the software and its documentation.
// All copies of the above copyright notice shall appear wherever the software is used. This software is developed
// Maintain Huijia studio. If you have any questions, please contact us. Thank you for using it.
//
//////////////////////////////////////// ///////////////////////////////////////
Require ("woods-thtml.php"); // generate an HTML processing Header
// If (count ($ _ GET) <1 & count ($ _ POST) <1) {require ("woods-thtml.php") ;}// generate an HTML processing Header
Require ("{$ exec_file}"); // register the language definition file
Foreach ($ lang as $ key => $ value)
{
$ Atpl [strtoupper ($ key). "_ LANG"] = $ value;
}
/* ________________________________________________ List items going up with common sense _____________________*/
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 the end of HTML processing
?>