Esempio n. 1
0
 public function tpl($new = false)
 {
     if (!$new && $this->tpl != null) {
         return $this->tpl;
     }
     $tpl = new smarty();
     $tpl->setTemplateDir(PAGE_DIR);
     $tpl->setCompileDir(TEMP_DIR . '/tplc');
     $tpl->setConfigDir(CONFIG_DIR);
     $tpl->setCacheDir(TEMP_DIR . '/pagecache');
     $tpl->autoload_filters = array('pre' => array('hu60ext'));
     $tpl->setCompileId($this->page['bid'] . '.' . $this->page['tpl']);
     if (SMARTY_COMPILE == 1) {
         $tpl->compile_check = false;
     } elseif (SMARTY_COMPILE == 2) {
         $tpl->force_compile = true;
     }
     $tpl->assign(array('PAGE' => $this, 'CID' => $this->page['cid'], 'PID' => $this->page['pid'], 'BID' => $this->page['bid'], 'page' => $this, 'cid' => $this->page['cid'], 'pid' => $this->page['pid'], 'bid' => $this->page['bid']));
     $this->tpl = $tpl;
     return $tpl;
 }