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 Herman Veluwenkamp  >  Template  >  test.php  >  Download  
File: test.php
Role: ???
Content type: text/plain
Description: Test program for Template Class.
Class: Template
Generates HTML using templates.
Author: By
Last change:
Date: 2000-08-03 00:43
Size: 1,026 bytes
 

Contents

Class file image Download
<?
error_reporting(E_ALL);
include('template.inc');
?>
<html>
<head>
<title>Test of Template Class</title>

<STYLE TYPE="text/css">
.listHead { font: bold 12pt sans-serif; background: #cccc99;}
.listData { font: normal 12pt sans-serif;}
.listDark { background: #eeeeee; }
.listLite { background: #dddddd; }
.list-bg { background: #333333; }
</STYLE>

</head>

<body>
<?
$primary = array(
              array("ABC",2.44,2.45,2.5),
              array("DEF",1.2,1.4,1.45),
              array("HIJ",2.44,2.45,2.5),
              array("KLM",6.55,6.66,6.7),
              array("MNO",2.34,2.5,2.7),
              array("PQR",3.4,4.45,4.5));
              
$main = new html_template;
$main->file_name = "template.html";
$main->initialise();
$main->toggle = array('Dark', 'Lite'); //used for alternating backgrounds for example.

//assign data to array entry with key same as template name.
$main->repeat['primary']['data'] = $primary; 

$main->code();
$main->display();

?>
</body>
</html>