<?
if(!defined('SOFTPUBS_IN')){
    die('Hacking attempt');
}

class template
{
	var $out	=	array();

	function __construct()
  	{
		require_once(SMARTY_DIR.'Smarty.class.php');
		$this->tpl						= new Smarty;	
		$this->tpl->template_dir 	= TEMPLATE_DIR;
      $this->tpl->compile_dir 	= TEMPLATE_C_DIR;	
		$this->tpl->left_delimiter	=	'<%{';
		$this->tpl->right_delimiter =  '}%>';
	}

	function display($tpl)
	{
		 $this->tpl->assign('out',$this->out);
       $this->tpl->display($tpl);	
	}
	
	function fetch($tpl)
 	{
   	 $this->tpl->assign('out',$this->out);
    	 return $this->tpl->fetch($tpl);
 	}
}
