load_template('main.tpl'); $tpl->set('{calendar}',calendar ()); $tpl->set('{archives}',$echo_archives); $tpl->set('{vote}', $tpl->result['vote']); $tpl->set('{topnews}',$topnews); $tpl->set('{login}',$login_panel); $tpl->set('{info}', "".$tpl->result['info'].""); $tpl->set('{speedbar}', $tpl->result['speedbar']); if (count($banners) AND $config['allow_banner']) { foreach ($banners as $name => $value) { $tpl->copy_template = str_replace("{banner_".$name."}",$value, $tpl->copy_template); }} if ($do=="") $do = $subaction; if ($do=="" AND $year) $do = "date"; $tpl->copy_template = preg_replace( "#\\[aviable=(.+?)\\](.*?)\\[/aviable\\]#ies","check_module('\\1', '\\2', '{$do}')", $tpl->copy_template); if ( stristr( $tpl->copy_template, "[group=" ) ) { $tpl->copy_template = preg_replace( "#\\[group=(.+?)\\](.*?)\\[/group\\]#ies","check_group('\\1', '\\2')", $tpl->copy_template); } if ( stristr( $tpl->copy_template, "[category=" ) ) { $tpl->copy_template = preg_replace( "#\\[category=(.+?)\\](.*?)\\[/category\\]#ies","check_category('\\1', '\\2', '{$category_id}')", $tpl->copy_template); } $tpl->copy_template = preg_replace( "#\\{custom category=['\"](.+?)['\"] template=['\"](.+?)['\"] aviable=['\"](.+?)['\"] from=['\"](.+?)['\"] limit=['\"](.+?)['\"] cache=['\"](.+?)['\"]\\}#ies", "custom_print('\\1', '\\2', '\\3', '\\4', '\\5', '\\6', '{$do}')", $tpl->copy_template ); $config['http_home_url'] = reset(explode("index.php", $_SERVER['PHP_SELF'])); $ajax = <<
{$pm_alert} HTML; $tpl->set('{AJAX}', $ajax); $tpl->set('{headers}', $metatags); if ($config['allow_skin_change'] == "yes") $tpl->set('{changeskin}', ChangeSkin (ROOT_DIR.'/templates', $config['skin'])); $tpl->set('{content}', "