Sample> Global Parse

<?php

// include TPLN
include('TPLN/TPLN.php');

define('m','test_contant');

// this example shows the possibily to
// interface your template with a php variable
$text 'Hi';

// class to test automatic parsing
class Personne
{
    var 
$name 'test object';
}

$personne = new Personne();
$test['name'] = '"php array" !';

// protect POST
if($_POST)
{
    
$_POST['visitor'] = htmlentities($_POST['visitor']);
}



// execution
$TPLN = new TPLN;
$TPLN->open('global_parse.html');
$TPLN->write();


?>
<html>
<head>
    <title>TPLN - Global Parse ! Sample</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <h1>{$text} {$_POST['visitor']} !</h1>
   <form name="form" action="" method="POST">
       Name: <input type="text" name="visitor" value="{$_POST['visitor']}" /> <input type="submit" />
   </form>

   <br>
   <p><b>I'm a php constant : {CONST::m}</b>
   <p>I'm from a php object {$personne->name}</p>
   <p>I'm from a php array {$test['name']}</p>

<br>
<br>
{_Logo}<font size="1"> in {_Chrono} s<br>
Queries executed: {_QueryCount}</font>

</body>
</html>