if (isset($_REQUEST[session_name()])) @session_start(); $name_stranica='catalog'; $base_path="../"; $bp="../"; if(isset($_GET['id_catalog'])) $bp="../../../"; $name_region="Москва и Московская область"; $name_razdel="Все объявления"; require_once($base_path.'connect/connect.php'); include_once($base_path.'lib/lib.php'); include_once($base_path.'connect/_svod_rec.php'); $tree_reg=array(0); $tree_cat=array(0); if($_GET['id_catalog']) { $id_catalog=intval($_GET['id_catalog']); $cam=urlencode(anti($_GET['cam'])); } if($_GET['id_region']) { $rem=urlencode(anti($_GET['rem'])); $id_region=intval($_GET['id_region']); $r = mysql_query("SELECT id_region, parent_glob, path FROM region WHERE id_region = '".$id_region."' AND url='".$rem."'"); $nr=mysql_num_rows($r); if(!$nr) { header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); echo "
"; exit; } $rr = mysql_fetch_array($r); $glob_region=$rr['parent_glob']; if(!$glob_region) $glob_region=$rr['id_region']; $tree_reg = explode(' ', trim($rr['path'].' '.$id_region)); } if(file_exists($base_path.'cashe_region/_svod_region_0.php')) include_once($base_path.'cashe_region/_svod_region_0.php'); // регионы первого уровня if($glob_region && file_exists($base_path.'cashe_region/_svod_region_'.$glob_region.'.php')) include_once($base_path.'cashe_region/_svod_region_'.$glob_region.'.php'); // наш регион for ($i=1; $i