public function Compile($cont_name, $subhead = '') { foreach ($this->row_content as $row_name => $row_content) { if ($row_content) { $this->SetBlockContent($row_name, $row_content); } } $this->ClaerContent($this->content); if (!self::$show_sub) { $subhead = $this->subhead . $subhead; self::$show_sub = true; } if (!self::$show_superhead) { $this->style_cur = $this->superhead . $this->style_cur; self::$show_superhead = true; } if ((!defined('AJAX') || !AJAX) && (!defined('RSS') || !RSS)) { if ($this->_blank) { $this->Set($this->style_cur, "__style__")->Set($this->script_cur, "__script__")->Set($this->superhead, "__superhead__")->Set($subhead, "__subhead__"); $this->content = preg_replace('#__.*?__#i', '', $this->content); $this->content = str_replace('{THEME}', $GLOBALS['config']['http_home_url'] . 'templates/' . $GLOBALS['config']['skin'], $this->content); } else { $this->content = $this->style_cur . $this->script_cur . $subhead . $this->content; } } elseif (!defined('RSS') || !RSS) { $this->content = $this->ajax_style_cur . $this->ajax_script_cur . $this->AJAX_script . $this->content; } $this->tpl->compile($cont_name); $this->tpl->clear(); $this->row_name = $this->sep_count = $this->row_count = $this->separator = $this->row_template = $this->row_content = array(); $cur_content = $this->tpl->result[$cont_name]; $this->content = $this->style_cur = $this->script_cur = $this->ajax_style_cur = $this->ajax_script_cur = ''; return $cur_content; }