ображение ошибок ini_set("display_errors",0); error_reporting(E_ALL); /* ===================================================== DataLife Engine - by SoftNews Media Group ----------------------------------------------------- http://dle-news.ru/ ----------------------------------------------------- Copyright (c) 2004,2012 SoftNews Media Group ===================================================== Данный код защищен авторскими правами ===================================================== Файл: index.php ----------------------------------------------------- Назначение: Главная страница ===================================================== */ session_start (); @ob_start (); @ob_implicit_flush ( 0 ); @error_reporting ( E_ALL ^ E_WARNING ^ E_NOTICE ); @ini_set ( 'display_errors', true ); @ini_set ( 'html_errors', false ); @ini_set ( 'error_reporting', E_ALL ^ E_WARNING ^ E_NOTICE ); define ( 'DATALIFEENGINE', true ); $member_id = FALSE; $is_logged = FALSE; define ( 'ROOT_DIR', dirname ( __FILE__ ) ); define ( 'ENGINE_DIR', ROOT_DIR . '/engine' ); require_once ROOT_DIR . '/engine/init.php'; if (clean_url ( $_SERVER['HTTP_HOST'] ) != clean_url ( $config['http_home_url'] )) { $replace_url = array (); $replace_url[0] = clean_url ( $config['http_home_url'] ); $replace_url[1] = clean_url ( $_SERVER['HTTP_HOST'] ); } else $replace_url = false; $tpl->load_template ( 'main.tpl' ); $tpl->set ( '{calendar}', $tpl->result['calendar'] ); $tpl->set ( '{archives}', $tpl->result['archive'] ); $tpl->set ( '{tags}', $tpl->result['tags_cloud'] ); $tpl->set ( '{vote}', $tpl->result['vote'] ); $tpl->set ( '{topnews}', $tpl->result['topnews'] ); $tpl->set ( '{login}', $tpl->result['login_panel'] ); $tpl->set ( '{info}', $tpl->result['info'] ); $tpl->set ( '{speedbar}', $tpl->result['speedbar'] ); if ($config['allow_skin_change'] == "yes") $tpl->set ( '{changeskin}', ChangeSkin ( ROOT_DIR . '/templates', $config['skin'] ) ); if (count ( $banners ) and $config['allow_banner']) { foreach ( $banners as $name => $value ) { $tpl->copy_template = str_replace ( "{banner_" . $name . "}", $value, $tpl->copy_template ); } } $tpl->set_block ( "'{banner_(.*?)}'si", "" ); if (count ( $informers ) and $config['rss_informer']) { foreach ( $informers as $name => $value ) { $tpl->copy_template = str_replace ( "{inform_" . $name . "}", $value, $tpl->copy_template ); } } if ($allow_active_news AND $config['allow_change_sort'] 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 (stripos ( $tpl->copy_template, "[category=" ) !== false) { // $tpl->copy_template = preg_replace ( "#\\[category=(.+?)\\](.*?)\\[/category\\]#ies", "check_category('\\1', '\\2', '{$category_id}')", $tpl->copy_template ); // } // if (stripos ( $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 ); // } if (stripos ( $tpl->copy_template, "[static=" ) !== false) { $tpl->copy_template = preg_replace ( "#\\[static=(.+?)\\](.*?)\\[/static\\]#ies", "check_static('\\1', '\\2')", $tpl->copy_template ); } if (stripos ( $tpl->copy_template, "[not-static=" ) !== false) { $tpl->copy_template = preg_replace ( "#\\[not-static=(.+?)\\](.*?)\\[/not-static\\]#ies", "check_static('\\1', '\\2', false)", $tpl->copy_template ); } // if (stripos ( $tpl->copy_template, "{custom" ) !== false) { // $tpl->copy_template = preg_replace ( "#\\{custom category=['\"](.+?)['\"] template=['\"](.+?)['\"] aviable=['\"](.+?)['\"] from=['\"](.+?)['\"] limit=['\"](.+?)['\"] cache=['\"](.+?)['\"]\\}#ies", "custom_print('\\1', '\\2', '\\3', '\\4', '\\5', '\\6', '{$dle_module}')", $tpl->copy_template ); // } $config['http_home_url'