<?
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> |