DLE4U.COM'; $powered = 'Powered by Datalife Engine 7U Edition '; define ( 'ROOT_DIR', dirname ( __FILE__ ) ); define ( 'ENGINE_DIR', ROOT_DIR . '/engine' ); require_once ROOT_DIR . '/engine/data/dle7u.config.php'; global $dle7u; require_once ROOT_DIR . '/engine/init.php'; require_once ROOT_DIR . '/engine/modules/lastcomm.php'; require_once ROOT_DIR . '/engine/modules/obmen2.php'; require_once ROOT_DIR . '/engine/modules/catlist.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; $homeurl = $config['http_home_url']; $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 ( '{siteinfo}', $siteinfo ); $tpl->set ( '{obmen2}', $obmen2 ); $tpl->set ( '{lista_categoria}', $catlist ); $tpl->set ( '{topnews}', $topnews ); $tpl->set ( '{login}', $login_panel ); $tpl->set ( '{info}', "" . $tpl->result['info'] . "" ); $tpl->set ( '{online}', $tpl->result['online']); $tpl->set ('{lastcomments}', $lastcomment); $tpl->set ( '{speedbar}', $tpl->result['speedbar'] ); $tpl->set ( '{copy}', $copy ); $tpl->set ( '{HOME}', substr($config['http_home_url'],0, -1) ); $tpl->set ( '{powered}', $powered ); $tpl->set ( '{bd}', $db->query_num ); $tpl->set ( '{bd_t}', round($db->MySQL_time_taken, 3) ); 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 ($do == "" and ! $subaction and $year) $do = "date"; elseif ($do == "" and $catalog) $do = "catalog"; elseif ($do == "") $do = $subaction; if ($allow_active_news and $config['allow_change_sort'] and ! $config['ajax']) { $tpl->set ( '[sort]', "" ); $tpl->set ( '{sort}', news_sort ( $do ) ); $tpl->set ( '[/sort]', "" ); } else { $tpl->set_block ( "'\\[sort\\](.*?)\\[/sort\\]'si", "" ); } if (strpos ( $tpl->copy_template, "[aviable=" ) !== false) { $tpl->copy_template = preg_replace ( "#\\[aviable=(.+?)\\](.*?)\\[/aviable\\]#ies", "check_module('\\1', '\\2', '{$do}')", $tpl->copy_template ); } if (strpos ( $tpl->copy_template, "[not-aviable=" ) !== false) { $tpl->copy_template = preg_replace ( "#\\[not-aviable=(.+?)\\](.*?)\\[/not-aviable\\]#ies", "check_module('\\1', '\\2', '{$do}', false)", $tpl->copy_template ); } if (strpos ( $tpl->copy_template, "[not-group=" ) !== false) { $tpl->copy_template = preg_replace ( "#\\[not-group=(.+?)\\](.*?)\\[/not-group\\]#ies", "check_group('\\1', '\\2', false)", $tpl->copy_template ); } if (strpos ( $tpl->copy_template, "[group=" ) !== false) { $tpl->copy_template = preg_replace ( "#\\[group=(.+?)\\](.*?)\\[/group\\]#ies", "check_group('\\1', '\\2')", $tpl->copy_template ); } 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 ); } if (strpos ( $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', '{$do}')", $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 ($allow_comments_ajax AND ($config['allow_comments_wysiwyg'] == "yes" OR $config['allow_quick_wysiwyg'])) $ajax .= << HTML; if (strpos ( $tpl->result['content'], "hs.expand" ) !== false or strpos ( $tpl->copy_template, "hs.expand" ) !== false or $config['ajax'] or $pm_alert != "") { if ($pm_alert != "") $hs_prefix = "-html"; else $hs_prefix = ""; $ajax .= << {$pm_alert} HTML; } $tpl->set ( '{AJAX}', $ajax ); if($dle7u['dleshack'] != "0") $tpl->set ( '{headers}', $shackli.$metatags ); else$tpl->set ( '{headers}', $metatags ); $tpl->set ( '{content}', "