////////
- //
- // Zhang Shulin-Huijia Studio
- //
- // Module Name: woods-bhtml.php
- // Abstract: generate the end of the static HTML processing program
- // Version 2.0
- // 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 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 );
- /* -- _ Handle the path problem caused by generating HTML files -- ______ end --_*/
- }
$ Fp = fopen (HTML_FILE, "w ");
- If ($ fp)
- {
- Fwrite ($ fp, $ buffer );
- Fclose ($ fp );
- }
- }
- /* -- _ Generate the HTML file ---- beign ----____*/
- ?>
//////////////////////////////////////// ///////////////////////////////////////
- //
- // Zhang Shulin-Huijia Studio
- //
- // Module Name: woods-thtml.php
- // Abstract: generate a static HTML processing program header
- // Version 2.0
- // Date 1006-11-25
- // 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 ();
- /* -- Determines whether an HTML file has been generated. If yes, 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 jumps to the HTML page -- end --__*/
- ?>
//////////////////////////////////////// ///////////////////////////////////////
- //
- // Zhang Shulin-Huijia Studio
- //
- // Module Name: index. php
- // Abstract: home page information
- // Version 1.0
- // Date 2006-11-7
- //
- // 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 common sense items going up -- 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 operation ---- end ----*/
- Require ("woods-bhtml.php"); // Generate the end of HTML processing
- ?>
Articles you may be interested in: three methods for generating static pages in php and code details examples of generating static page functions in php (php2html) php-written static page generation class generates all the content in the database html static page code VM automatically generates static pages on a regular basis php-generated static page detailed tutorial apache access solution to pseudo-static pages: code for generating static pages by using the web crawler record of static pages written by php: smarty method for generating static pages PHP method for generating static pages apache solution for accessing pseudo-static pages |