Программный комплекс GeoDirect Скоро!

## $_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($_REQUEST['re']) : 'index'; $siteglobal['pa'] = (isset($_REQUEST['pa']) && preparse($_REQUEST['pa'],THIS_SYMNUM)==0) ? $api->sitepa($_REQUEST['pa']) : ''; /* ==================================================== ## ## SEOURL ## ## ==================================================== */ $siteglobal['seourl'] = ($setting['rewrite']=='yes' && $setting['cpu']=='yes') ? 1 : 0; /* ==================================================== ## ## Моды, без кэширования ## ## ==================================================== */ 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']); } } /* ==================================================== ## ## Рабочий мод и шаблон ## ## ==================================================== */ $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(isset($setting['block']) && is_array($setting['block'])){ // foreach($setting['block'] as $key => $block){ // $setting['barray'] = @unserialize($block['block_mods']); $setting['bview'] = 1; // if(isset($setting['barray'][$siteglobal['dn']])){ // if($block['block_label']){ $setting['larray'] = @unserialize($block['block_label']); if(isset($setting['larray'][$siteglobal['dn']])){ $setting['marray'] = @explode('|',$setting['mod'][$siteglobal['dn']]['label']); $setting['bview'] = (isset($setting['larray'][$siteglobal['dn']][$siteglobal['to']]) || !in_array($siteglobal['to'],$setting['marray'])) ? 1 : 0; } } // $setting['bview'] = ($block['block_access']=='user' && preparse($usermain['logged'],THIS_INT)==0 && preparse($usermain['userid'],THIS_INT)==0) ? 0 : $setting['bview']; // if($setting['bview'] == 1){ $setting['bcontent'] = ($block['block_file']) ? (@include(DNBASE."block/".$block['block_file'])) : $block['block_cont']; $bout = ($tm->parse(array('blockname'=>$block['block_name'], 'blockcont'=>$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']); } /* ==================================================== ## ## Проверка файла мода ## ## ==================================================== */ $siteglobal['refile'] = (@file_exists(DNBASE."mod/".$siteglobal['dn']."/".$siteglobal['re'].".php")) ? $siteglobal['re'] : 'index'; /* ==================================================== ## ## Подключение файла мода ## ## ==================================================== */ include(DNBASE."mod/".$siteglobal['dn']."/".$siteglobal['refile'].".php"); /* ==================================================== ## ## EXIT ## ## ==================================================== */ exit(); ?>