Source of: /ADI/auth-db-sessions/login_smarty.php

<?php

session_start
();

// put full path to Smarty.class.php
require_once('/usr/share/php/smarty/libs/Smarty.class.php');
$smarty = new Smarty();

$smarty->template_dir = 'templates';
$smarty->compile_dir = 'templates_c';

      
      
   if ( isset(
$_SESSION['message']) )
      
$smarty->assign('MESSAGE', $_SESSION['message']);
   else
      
$smarty->assign('MESSAGE', '');

       if ( isset(
$_SESSION['uid']) )
      
$smarty->assign('uid', $_SESSION['uid']);
   else
      
$smarty->assign('uid', '');
  

 
// Actualiza o template
 
$smarty->display('login_template.tpl');
 
?>