<?php
include_once("lib/TemplateThis.class.php");
$parser = new TemplateThis("test.tpl");
$parser->assign("title", "Test Template");
$parser->assign("url", "http://www.sourceforge.net/");
$parser->assign("text", "SourceForge Home Page");
$parser->assign("group", "admin");
$parser->assign("pick_color", array("Red", "Green", "Blue", "Purple"));
$parser->assign("pick_default", "Red");
$parser->append("title", " - TemplateThis");
$parser->prepend("title", "TemplateThis ");
$users = array(
array("NAME" => "John Doe", "CITY" => "San Francisco"),
array("NAME" => "Jane Doe", "CITY" => "Nashville"),
array("NAME" => "Nicholas Sack", "CITY" => "St. Louis"),
array("NAME" => "Tux", "CITY" => "Linux")
);
$groups = array(
array("GROUP" => "Administrators"),
array("GROUP" => "Moderators"),
array("GROUP" => "Users"),
array("GROUP" => "Unregistered")
);
$parser->assign("users", $users);
$parser->assign("groups", $groups);
$parser->output();
?>
|