Exemplo n.º 1
0
$lang = new $langSelected();
$heute = date("Ymd", time());
// current date
/*
 * Template
 */
function tpl_translate($args)
{
    global $lang;
    return $lang->translate($args[0]);
}
$_tplset = 'screen';
$tpl = new IntegratedTemplateExtension($cfg['path']['template']);
$tpl->loadTemplateFile($_tplset . '/' . $cfg['template']['base']);
$tpl->setCallbackFunction('tr', 'tpl_translate');
$tpl->performCallback();
/*
 * Opens database connection
 */
$db_con = DB::connect($cfg['database']['dsn']);
//$db_con->setErrorHandling(PEAR_ERROR_CALLBACK, "DBcatchError");
if (DB::isError($db_con)) {
    die($db_con->getMessage());
}
$db_con->setFetchMode(DB_FETCHMODE_OBJECT);
$menu = new mms_template_menu();
//$th=new treehelper;
if (BANNER_ADS) {
    $banner_array = view_raw("468x60");
    $content["BANNER"] = $banner_array["html"];
}
Exemplo n.º 2
0
 /** initializes the template class
  */
 function initTemplate()
 {
     include_once 'HTML/Template/ITX.php';
     $tpl = new IntegratedTemplateExtension($this->cfg['path']['template']);
     $tpl->loadTemplateFile($_tplset . '/' . $this->cfg['template']['base']);
     $tpl->setCallbackFunction('tr', 'tpl_translate');
     $tpl->performCallback();
 }