Smarty(); $this->template_dir = '/usr/share/interfacedu/smarty/templates/'; $this->config_dir = '/usr/share/interfacedu/smarty/configs/'; $this->compile_dir = '/var/cache/interfacedu/templates_c/'; $this->cache_dir = '/var/cache/interfacedu/cache/'; // think twice before enabling caching, is everything really // ready to be cached? $this->caching = false; $this->assign('app_name', 'SE3'); $this->assign('app_version', '2'); $this->assign('stylesheet', 'default'); $this->assign('title', 'This is the default title, call ' . '$smarty->assign("title", "the title") to fix it'); if ($DEBUG) { $this->info("

POST

".print_r($_POST,1)."
"); $this->info("

SESSION

".print_r($_SESSION,1)."
"); $this->info("

GET

".print_r($_GET,1)."
"); } $this->register_block('help','block_help_icon'); } function info($msg) { if ($this->get_template_vars("infomsg")) { $this->append("infomsg", $msg); } else { $this->assign("infomsg", array($msg)); } } function warning($msg) { if ($this->get_template_vars("warningmsg")) { $this->append("warningmsg", $msg); } else { $this->assign("warningmsg", array($msg)); } } function error($msg) { if ($this->get_template_vars("errormsg")) { $this->append("errormsg", $msg); } else { $this->assign("errormsg", array($msg)); } } function menutab($name,$page,$action='none',$options=array()) { $menutab=array("name" =>$name, "page" =>$page, "action" =>$action, "options"=>$options); if ($this->get_template_vars("menutabs")){ $this->append("menutabs",$menutab); } else { $this->assign("menutabs",array($menutab)); } } function tab_input($name,$value='') { if ($this->get_template_vars("tabinputs")){ $this->append("tabinputs",array("name"=>$name,"value"=>$value)); } else { $this->assign("tabinputs",array(array("name"=>$name,"value"=>$value))); } } function activetab($name){ $this->assign("activetab",$name); } } // Generic help block function block_help_icon($params, $content, &$smarty) { if (isset($content)) { $content = trim(str_replace('\'', '\\\'', stripslashes($content))); $help = " \n"; return $help; } } // Global Smarty Object $SmartySe3 = new SmartySe3(); ?>