load_template('forum/index.tpl'); else $tpl->load_template('main.tpl'); $tpl->set('{toporders}', $toporders); $tpl->set ( '{login}', $tpl->result['login_panel'] ); $tpl->set ( '{info}', "
" . $tpl->result['info'] . "
" ); $tpl->set('{online}', $tpl->result['online']); $tpl->set ( '{minichat}', $tpl->result['minichat'] ); $tpl->set('{forum}', $tpl->result['forum_table']); $tpl->set ( '{comments-last}', $commentslast ); $tpl->set('{category_menu}', $cat_menu); if ($allow_active_news AND $do != "userinfo") {$tpl->set ( '[sort]', "" );$tpl->set ( '{sort}', news_sort ( $do ) );$tpl->set ( '[/sort]', "" );} else {$tpl->set_block ( "'\\[sort\\](.*?)\\[/sort\\]'si", "" );} if ($dle_module == "showfull" ) {if (is_array($cat_list) AND count($cat_list) > 1 ) $category_id = implode(",", $cat_list);} if (strpos ( $tpl->copy_template, "[category=" ) !== false) {$tpl->copy_template = preg_replace ( "#\\[category=(.+?)\\](.*?)\\[/category\\]#ies", "check_category('\\1', '\\2', '{$category_id}')", $tpl->copy_template );} if (strpos ( $tpl->copy_template, "[not-category=" ) !== false) {$tpl->copy_template = preg_replace ( "#\\[not-category=(.+?)\\](.*?)\\[/not-category\\]#ies", "check_category('\\1', '\\2', '{$category_id}', false)", $tpl->copy_template );} $config['http_home_url'] = explode ( "index.php", strtolower ( $_SERVER['PHP_SELF'] ) ); $config['http_home_url'] = reset ( $config['http_home_url'] ); if (! $user_group[$member_id['user_group']]['allow_admin']) $config['admin_path'] = ""; $ajax .= << HTML; if (strpos ( $tpl->result['content'], "hs.expand" ) !== false or strpos ( $tpl->copy_template, "hs.expand" ) !== false or $pm_alert != "") { $ajax .= << {$pm_alert} HTML; } $tpl->set ( '{AJAX}', $ajax ); if(isset($_GET['category'])){ $tpl->set('[newslist]',''); $tpl->set('{newslist}', "/newslist/".$_GET['category']."/"); $tpl->set('{news_pol}', $_GET['category']."/"); $tpl->set('[/newslist]',''); } else{$tpl->set_block("'\[newslist\](.*?)\[/newslist\]'si",""); $tpl->set('{news_pol}', "");} $tpl->set ( '{headers}', $metatags ); $tpl->set ( '{content}', "
" . $tpl->result['content'] . "
" ); $tpl->compile ( 'main' ); $tpl->result['main'] = str_replace ( '{THEME}', $config['http_home_url'] . 'templates/' . $config['skin'], $tpl->result['main'] ); if ($replace_url) $tpl->result['main'] = str_replace ( $replace_url[0]."/", $replace_url[1]."/", $tpl->result['main'] ); $tpl->result['main'] = str_replace("%username%", $is_logged?$member_id['name']:'Юзер', $tpl->result['main']); echo $tpl->result['main']; $tpl->global_clear (); $db->close (); GzipOut (); ?>