if (isset($_REQUEST[session_name()])) @session_start(); $name_stranica='catalog'; $base_path="../"; $bp="./"; if(isset($_GET['id_catalog'])) $bp="../../"; require_once($base_path.'connect/connect.php'); include_once($base_path.'lib/lib.php'); include_once($base_path.'connect/_svod_rec.php'); $name_region=$default_region_name; $title="Доска объявлений"; $h1="Доска объявлений"; $tree_reg=array(0); $tree_cat=array(0); if($_GET['id_catalog']) { $id_catalog=intval($_GET['id_catalog']); } if(isset($_COOKIE['Regiondata']) && !$_SERVER['QUERY_STRING']) { $_GET['id_region']=intval($_COOKIE['Regiondata']); /// } if($_GET['id_region']) { $id_region=intval($_GET['id_region']); $r = mysql_query("SELECT id_region, parent_id, parent_glob, path FROM region WHERE id_region = '".$id_region."' "); $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); $parent_id_r = $rr['parent_id']; $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