<?php
require_once("../x64Template.php");
require_once("../plugins/PHP_code_plugin.php");
//
//We start the object
//
$tpl=new x64Template();
//
//We set some values
//
$tpl->set("title","x64Template - Plugins example");
$tpl->set("keywords","x64Template, plugins example");
$tpl->set("description","x64Template - example using a simple PHP code highlighter plugin");
$tpl->set("author","Atomo64");
$tpl->set("robots","None");
$tpl->set("[PHP_SELF]",$_SERVER['PHP_SELF']);
//
//If the user sent some PHP code then we add it
// note that the third param tells the engine to look up for 'if' tags
//
$tpl->set("code",(isset($_POST['code']))? htmlentities($_POST['code']) : '',true);
//
//And now we add the plugin
//
$tpl->add_plugin("php_code_plugin");
//
//Now we tell the class to parse a file
//
die($tpl->fetch("templates/example5.tpl"));
?>
|