Location: PHPKode > projects > ExTemplates Library > welcome.php
<?

/*
This script is a part of the ExTemplates Library
Author: Alexander Netkachev

Check the license.txt for copyright and terms.
*/


include('ExTemplateLib.php');

$username = $HTTP_GET_VARS['username'];

if (strlen($username) == 0)
  exit ('User name is not specified.');

$tf = new TemplateFactory();
$t = & $tf->getTemplate('welcome.html');
$t->setVariable('user', $username);

$userMenu = & $t->getControl('userMenu');
$adminMenu = & $t->getControl('adminMenu');

if ($username == 'Joe')
  $userMenu->setVisible(false);
else
  $adminMenu->setVisible(false);

print $t->render();
?>
 
Return current item: ExTemplates Library