Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of larry bird  >  Template Generation  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: test file of working template
Class: Template Generation
Template engine that replaces regular expression
Author: By
Last change:
Date: 8 years ago
Size: 2,198 bytes
 

Contents

Class file image Download
<?          /*
+-------------------------------------------------------------------------------+
|   name Template Gereation Class + Simple Lang Patch                           |
|   file: test.php                                                              |
|   vaersion 2006/feb/07                                                        |
|   Released under the terms and conditions of the GNU General Public License   |
|   For more details: http://gnu.org                                            |
|                                                                               |
|   Test on these System Configuration:                                         |
|       Apache/2.0.55 (Win32) PHP/5.1.2 + MySQL/5.0.15                          |
|       Apache/2.0.52 (Unix)  PHP/4.3.9 + MySQL/4.0.21                          |
|       Apache/2.0.52 (Unix)  PHP/5.0.2 + MySQL/4.0.21                          |
+-------------------------------------------------------------------------------+
        */
require("classTPL.php");
$tpl = new ClassTPL();
$tpl->Page();
            
/*
+-----------------------------------------------------------------------+
|    When you want to use differnt template file for parsing,           |
|    just replace $tpl->Page(); with $tpl->Page("yourClassName.tpl");   |
+-----------------------------------------------------------------------+
        */
$tpl->includion("""langPatch");
            
/*
+-----------------------------------------------------------------------+
|    Simple way to use include function                                 |
+-----------------------------------------------------------------------+
        */
$tpl -> Page_replace_tags(array(
    
"TITLE" => _TITLE,
    
"TEST_01"    => _TEST01,
    
"TEST_02" => "<b>"._TEST02."</b>"));
$tpl -> Page_replace_tags(array("ExTIME" => round ($tpl->end $tpl->start3) . _ExTIME ));
$tpl -> Page_output();
            
/*
+-----------------------------------------------------------------------+
|    Simple way to use Template Gereation Class                         |
+-----------------------------------------------------------------------+
        */
?>