if (isset($_REQUEST[session_name()]))
@session_start();
if($_GET['lenta'])
{
@setcookie('lentatype', intval($_GET['lenta']), time()+30*24*3600, "/");
}
$name_stranica='catalog';
$no_hr=1;
$no_title=1;
$base_path="../";
$bp="../../";
if(isset($_GET['id_catalog']))
$bp="../../../../";
require_once($base_path.'connect/connect.php');
include_once($base_path.'lib/lib.php');
if (strpos($_SERVER['REQUEST_URI'], "?")!== false || strpos($_SERVER['REQUEST_URI'], "//")!== false || strpos($_SERVER['REQUEST_URI'], "/all_0/all_0/")!== false) url404($abs_base_file.'404.php'); //*******//*********//
if($_GET['id_akk'])
{
$id_akk=intval($_GET['id_akk']);
$id_magazin=$id_akk;
}
$r2=mysqli_query($connect,"SELECT * FROM akk WHERE id_akk='".$id_akk."' AND blok = 1 ");
$nr2 = mysqli_num_rows($r2);
if(!$nr2)
url404($abs_base_file.'404.php');
$rr2=mysqli_fetch_array($r2);
$name_title="Обявите от ".$rr2['contakt']." в AutoBazar.bg";
if($_GET['mod'])
{
$mod=intval($_GET['mod']);
if(!file_exists('mod'.$mod.'.php'))
url404($abs_base_file.'404.php');
$bp="../../../";
$name_title="Профилa на ".$rr2['contakt']." в AutoBazar.bg";
}
else
{
$tree_reg=array(0);
$tree_cat=array(0);
if($_GET['id_catalog'])
{
$id_catalog=intval($_GET['id_catalog']);
$cam=urlencode(anti($_GET['cam']));
}
elseif(isset($_GET['id_catalog']))
{
if($_GET['cam'] != 'all')
url404($abs_base_file.'404.php'); //*******//*********//
}
if($_GET['id_region'])
{
$rem=urlencode(anti($_GET['rem']));
$id_region=intval($_GET['id_region']);
$r = mysqli_query($connect,"SELECT id_region, parent_glob, path FROM region WHERE id_region = '".$id_region."' AND url='".$rem."'");
$nr=mysqli_num_rows($r);
if(!$nr)
url404($abs_base_file.'404.php'); //*******//*********//
$rr = mysqli_fetch_array($r);
$glob_region=$rr['parent_glob'];
if(!$glob_region)
$glob_region=$rr['id_region'];
$tree_reg = explode(' ', trim($rr['path'].' '.$id_region));
}
elseif(isset($_GET['id_region']))
{
if($_GET['rem'] != 'all')
url404($abs_base_file.'404.php'); //*******//*********//
}
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'); // наш регион
include_once($base_path.'cashe_catalog/_svod_catalog.php'); // дерево каталогов
if($id_catalog)
{
if(file_exists($base_path.'cashe_catalog/_svod_catalog_'.$id_catalog.'.php'))
{
include_once($base_path.'cashe_catalog/_svod_catalog_'.$id_catalog.'.php');
if($arr_catalog['url'] != $cam)
url404($abs_base_file.'404.php'); //*******//*********//
}
else
url404($abs_base_file.'404.php'); //*******//*********//
/////////////////////////
include_once($base_path.'plugin/board/func_search_user.php');
include_once($base_path.'plugin/board/func_view.php');
if($arr_sp)
{
foreach($arr_sp as $ars)
{
if(file_exists($base_path.'cashe_n/_svod_element_'.$ars[0].'.php'))
include_once($base_path.'cashe_n/_svod_element_'.$ars[0].'.php');
if(file_exists($base_path.'cashe_n/_svod_element_two_'.$ars[1].'.php'))
include_once($base_path.'cashe_n/_svod_element_two_'.$ars[1].'.php');
}
}
}
}
$soc_o_t = 'Авто обяви - AutoBazar.bg – Българският автомобилен пазар - обяви за автомобили, джипове, камиони, мотоциклети...'; // тег TITLE для социальных сетей
$soc_o_d = 'AutoBazar.bg – обяви за продажба на автомобили, камиони, джипове, бусове, мотоциклети, селскостопанска и строителна техника, джетове, авточасти... Авто Базар БГ – сайтът за авто обяви.'; // тег DESCRIPTION для социальных сетей
$soc_o_im = $absolut_path.'icon/autobazar.bg.png';
?>
include_once($base_path."blok/top_form.php");
?>
|
include_once("prof.php");
if(!$mod)
include_once($base_path."blok/search_form.php");
echo ' ';
include_once($base_path."google_yandex/pod_formoy_poiska.php");
echo ' ';
?>
|
|
|
if(!$mod)
{
if($_GET['lenta'])
$lenta=intval($_GET['lenta']);
elseif(isset($_COOKIE['lentatype']))
$lenta=intval($_COOKIE['lentatype']);
if($lenta !=1 && $lenta !=2) $lenta=1;
if($lenta==1)
{
include_once($base_path."blok/tab_img1.php");
}
else
{
if($arr_catalog['tab'])
include_once($base_path."blok/tab_tab.php");
else
include_once($base_path."blok/tab.php");
}
}
else
{
include_once('mod'.$mod.'.php');
}
?>
|
|
|
include_once($base_path."blok/bottom_form.php");
?>