noexistprint(); } /** * CLOSED */ if ($setting['closed'] == 'yes') { $tm->closeprint($setting['closedtext']); } /** * banner */ $adv = ($setting['banner'] == 'yes') ? new adv() : ''; /** * seourl */ $siteglobal['seourl'] = ($setting['rewrite'] == 'yes' && $setting['cpu'] == 'yes') ? 1 : 0; /** * breadcrumb */ $siteglobal['insert']['breadcrumb'] = ''; /** * Массив модов */ if (empty($setting['mod'])) { $setting['mod'] = array(); $modinq = $db->query("SELECT * FROM ".$basepref."_mods WHERE active='yes' ORDER BY mod_posit",$setting['cachetime']); while ($moditem = $db->fetchrow($modinq,$setting['cache'])) { $setting['mod'][$moditem['mod_fold']] = array( 'name' => $moditem['mod_name'], 'temp' => $moditem['mod_temp'], 'label' => $moditem['mod_label'], 'map' => $moditem['mod_map'], 'modid' => $moditem['modid'] ); } } /** * noexist */ if (isset($_REQUEST['dn'])) { $sdn = $api->sitedn($_REQUEST['dn']); if (!empty($sdn)) { if (!isset($setting['mod'][$sdn])) { $tm->noexistprint(); } } } /** * $_REQUEST */ $siteglobal['dn'] = (isset($_REQUEST['dn'])) ? $api->sitedn($_REQUEST['dn']) : ''; $siteglobal['to'] = (isset($_REQUEST['to'])) ? $api->sitedn($_REQUEST['to']) : 'index'; $siteglobal['re'] = (isset($_REQUEST['re'])) ? $api->sitedn(basename($_REQUEST['re'])) : 'index'; $siteglobal['pa'] = (isset($_REQUEST['pa']) && preparse($_REQUEST['pa'],THIS_SYMNUM,true) == 0) ? $api->sitepa($_REQUEST['pa']) : ''; /** * Мод */ $siteglobal['dn'] = (isset($setting['mod'][$siteglobal['dn']])) ? $siteglobal['dn'] : $setting['site_home']; $siteglobal['modname'] = (isset($setting['mod'][$siteglobal['dn']])) ? $setting['mod'][$siteglobal['dn']]['name'] : ''; if (isset($setting['mod'][$siteglobal['dn']]) && !empty($setting['mod'][$siteglobal['dn']]['temp'])) { $setting['site_temp'] = $setting['mod'][$siteglobal['dn']]['temp']; } /** * Массив блоков */ if(empty($setting['block'])){ $blockinq = $db->query("SELECT * FROM ".$basepref."_block WHERE block_active = 'yes' ORDER BY block_posit", $setting['cachetime']); while($blockitem = $db->fetchrow($blockinq,$setting['cache'])){ $setting['block'][$blockitem['blockid']] = $blockitem; } } /** * Доп.файл */ if ($siteglobal['re'] != 'index'){ $setting['scheme'] = @include(DNBASE.'mod/'.$siteglobal['dn'].'/mod.scheme.php'); $siteglobal['re'] = (is_array($setting['scheme']) && isset($setting['scheme'][$siteglobal['re']])) ? $siteglobal['re'] : 'index'; if ($siteglobal['re'] == 'index') { $tm->noexistprint(); } } /** * Блоки */ if (isset($setting['block']) && is_array($setting['block'])) { foreach ($setting['block'] as $key => $block) { $setting['barray'] = @unserialize($block['block_mods']); $setting['bview'] = 0; if (isset($setting['barray'][$siteglobal['dn']])) { $setting['bview'] = isset($setting['barray'][$siteglobal['dn']][$siteglobal['re']][$siteglobal['to']]) ? 1 : 0; if (!empty($siteglobal['pa'])) { $setting['bview'] = isset($setting['barray'][$siteglobal['dn']]['pa'][$siteglobal['pa']]) ? 1 : 0; } if ($setting['bview'] == 1 && $block['block_access'] == 'user') { if (preparse($usermain['logged'],THIS_INT) == 0 && preparse($usermain['userid'],THIS_INT) == 0) { $setting['bview'] = 0; } else { if ($setting['groupact'] == 'yes' && !empty($block['block_group'])) { $setting['bgroup'] = @unserialize($block['block_group']); $setting['bview'] = isset($setting['bgroup'][$usermain['gid']]) ? 1 : 0; } } } if ($setting['bview'] == 1) { $setting['bsarray'] = @unserialize($block['block_setting']); $setting['bcontent'] = ($block['block_file']) ? (include(DNBASE.'block/'.$block['block_file'])) : $block['block_cont']; $bout = $tm->parse(array('blockname' => $block['block_name'], 'blockcont' => stripslashes($setting['bcontent']) ), $tm->create('block/'.$block['block_temp'])); if (isset($siteglobal['insert'][$block['block_side']])) { $siteglobal['insert'][$block['block_side']].= $bout; } else { $siteglobal['insert'][$block['block_side']] = $bout; } } } } } /** * Меню */ if (isset($siteglobal['menu'])) { $siteglobal['insert'] = @array_merge($siteglobal['insert'],$siteglobal['menu']); } /** * include */ include(DNBASE.'mod/'.$siteglobal['dn'].'/'.$siteglobal['re'].'.php'); /** * exit */ exit(); ?>