All pastes #270178 Raw Edit

Yurez

public php v1 · immutable
·published 2006-12-07 04:02 UTC
rendered paste body
<?phpClass t_curnode Extends mod_common { var $nodecontent, $nodeparam, $nodeinfo;		function t_curnode($param='default'){		$this->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 <b>'.$class_name.'</b> 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:		}	}}?>