PHP Classes

File: example_usage.php

Recommend this page to a friend!
  Classes of Mark Williamson   phplibTemplateExtention   example_usage.php   Download  
File: example_usage.php
Role: Example script
Content type: text/plain
Description: example call and usage of AppTemplate class
Class: phplibTemplateExtention
Class AppTemplate Extends Template
Author: By
Last change:
Date: 21 years ago
Size: 751 bytes
 

Contents

Class file image Download
<?
/* example call to AppTemplate class - which extends phplibs Template class */


$t = new AppTemplate("main", "main_page.ihtml", "templates");
foreach(
$select as $v=>$sl){


       
$t->set_var("colspan", count($sl));
       
$t->set_var("style_name", $v);
        foreach(
$sl as $s){
               
$t->set_var("select", $s);
                 
//blocks generated names are always 'blockName'_block
                  //eg <!-- BEGIN block2 --> becomes block2_block
               
$t->parse("block2_block", "block2", 1);
        }

       
$t->parse("block1_block", "block1", 1);

}
$t->set_var("prodID", $prodID);
$t->set_var("html_output", "$output");
$t->set_var("phpself", $PHP_SELF);
$t->pp("output", "main");


?>