- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
if(isset($_POST['poisk'])){$poisk=$_POST['poisk']; $_SESSION['poisk']=$_POST['poisk'];}else{$poisk=$_SESSION['poisk'];}
$prov=intval($_GET['providers']); if($prov==0){unset ($prov);}
$rub=intval($_GET['rubric']); if($rub==0){unset ($rub);}
$gro=intval($_GET['group']); if($gro==0){unset ($gro);}
$con=intval($_GET['country']); if($con==0){unset ($con);}
$ven=intval($_GET['vendor']); if($ven==0){unset ($ven);}
$uid=intval($_GET['uid']); if($uid==0){unset ($uid);}
$str=intval($_GET['str']); if($str==0 or !isset($str) or $str<0){$str=1;}
$contr=intval($_GET['kontrakt']); if($contr==0){$contr=2;}
if(isset($_POST['strok']) and intval($_POST['strok'])!=0){$_SESSION['stroks']=intval($_POST['strok']);}
if(!isset($_SESSION['stroks'])){$strok=7;}else{$strok=$_SESSION['stroks'];}
if(isset($_GET['sort']) and trim($_GET['sort'])!=''){if($_SESSION['sort']==trim($_GET['sort'])){$changesort=1;} $_SESSION['sort']=trim($_GET['sort']);}
$sort=$_SESSION['sort']; if(!isset($_SESSION['sort'])){$sort='nazvanie'; $_SESSION['sort']='nazvanie';}
if(isset($_GET['by']) and trim($_GET['by'])!='' and $changesort==1){$_SESSION['by']=trim($_GET['by']);}
$by=$_SESSION['by']; if(!isset($_SESSION['by'])){$by='ASC'; $_SESSION['by']='ASC';}
if(isset($ven)){
$vat=mysql_fetch_array(mysql_query("SELECT nazvanie FROM partners WHERE ven=".$ven));
$tven=$vat[0];}
if(isset($con)){$katalog=2;}
if(isset($rub)){$katalog=1;}
if($search==2 or $search==1){$katalog=3;}
if(isset($ven) and isset($gro) and $ven!=0 and $gro!=0){
if($_SESSION['change']!=$ven.$gro or (!isset($_GET['vendor']) and $search!=1 and $search!=2) or !isset($_SESSION['change'])){$_SESSION['change']=$ven.$gro; $sort='nazvanie'; $_SESSION['sort']='nazvanie'; $by='ASC'; $_SESSION['by']='ASC';}