param = $param; } function run(){ $this->nodeinfo = $this->base->url->pathinfo[$this->base->url->curid]; $this->nodeparam = $this->base->url->param; switch ($this->param){ case 'head': $inline = tmpl_load($this->content); tmpl_set($inline, '/maintitle', $this->base->lang->cg('main', 'title')); tmpl_set($inline, '/pagetitle', $this->nodeinfo['title']); tmpl_set($inline, '/charset', $this->base->lang->curlangconf['config']['charset']); tmpl_set($inline, '/keywords', ''); if (!empty($this->nodeinfo['css'])){ $css = explode('|', $this->nodeinfo['css']); foreach ($css as $file){ tmpl_iterate($inline, '/css'); tmpl_set($inline, '/css/file', $file); } } $this->content = tmpl_parse($inline); break; case 'body': $this->nodecontent = & $this->base->url->cur_content; $modname = $this->nodeinfo['parser']; require_once($this->base->libdir.'mod_'.$modname.'.php'); $class_name = 't_'.$modname; $$modname = new $class_name($this->nodeinfo['param']); if (!class_exists($class_name)) $this->base->errhandler(22, 'Module class '.$class_name.' is not found', __LINE__, __FILE__); $$modname->set_base($this->base); $$modname->set_content($this->nodecontent); $$modname->set_cache($this->nodeinfo['idpage'], $this->nodeinfo['modified']); $$modname->run(); $out = & $$modname->get_output(); $inline = tmpl_load($this->content); tmpl_set($inline, '/content', $out); tmpl_set($inline, '/updmsg', $this->base->lang->cg('main', 'updmsg')); tmpl_set($inline, '/updated', date($this->base->lang->cg('main', 'upddate'), $this->nodeinfo['modified'])); $this->content = tmpl_parse($inline); break; default: } } } ?>