compile_check = true; if (ISSET($_GET['alerte'])) { $alerte=new alerte($_GET['alerte']); $dataAlerte=$alerte->get(); if ($dataAlerte['type']=="") header("Location: ".ROOT_HTTP); //print_r($dataAlerte); $smarty->assign("alerte",$dataAlerte); //$smarty->debugging =true; $smarty->caching = false; $filter=array( "type" => $dataAlerte['type'], "typeParking" => $dataAlerte['typeParking'], "hauteurMax" => $dataAlerte['hauteurMax'], "dureeBail" => $dataAlerte['dureeBail'], "typeVehicule" => $dataAlerte['typeVehicule'], "jours" => $dataAlerte['jours'], "horaires" => $dataAlerte['horaires'] ); $ortho=new orthodromie(); $smarty->assign("ltype",array(-1 => "- Tous -",0 => "Vente" ,1=>'Location')); $smarty->assign("ltypeParking",array(-1 => "- Tous -",0 =>'Parking couvert',1 =>'Parking exterieur',2 =>'Box')); $smarty->assign("lhauteurMax",array(-1 => "- Tous -",0 =>'-1,90 m',1=>'+1,90 m')); $smarty->assign("ldureeBail",array(-1 => "- Tous -",0 => '1 mois',1=>'3 mois',2=>'6 mois',3 =>'12 mois')); $smarty->assign("ltypeVehicule",array(-1 => "- Tous -",0=>'Moto',1=>'Citadine',2=>'Berline',3=>'4x4',4=>'Camionnette',5=>'Camion')); $smarty->assign("ljours",array(-1 => "- Tous -",0=>'Semaine complète',1=>'jours ouvrés',2=>'week-end')); $smarty->assign("lhoraires",array(-1 => "- Tous -",0=>'Jounée complète',1=>'horaire de travail',2=>'nuit')); //parking Prive if (isset($_POST['zone'])) $_SESSION['zone']=$_POST['zone']; elseif (!isset($_SESSION['zone'])) $_SESSION['zone']=$dataAlerte['distance']; if (isset($_POST['nbAnnonce'])) $_SESSION['nbAnnonce']=$_POST['nbAnnonce']; elseif (!isset($_SESSION['nbAnnonce'])) $_SESSION['nbAnnonce']=10; //Pager $params = array( 'mode' => 'Sliding', 'append' => true, 'urlVar' => 'page', 'fileName' => 'searchbyadress.php', 'itemData' => $ortho->searchPPrive2($dataAlerte['longitude'],$dataAlerte['latitude'],$_SESSION['zone'],100,$filter), 'perPage' => $_SESSION['nbAnnonce'], 'delta' => 5 ); $pager = & Pager::factory($params); $data = $pager->getPageData(); if (is_array($data)) { $i=0; foreach ($data as $donnee) { $data2[$i]=$donnee; $i++; } } //mise en session $_SESSION['numero']=''; $_SESSION['rue']=$dataAlerte['adresse']; $_SESSION['codePostal']=$dataAlerte['codePostal']; $_SESSION['ville']=$dataAlerte['ville']; $_SESSION['longitude']=$dataAlerte['longitude']; $_SESSION['latitude']=$dataAlerte['latitude']; //liste zone $smarty->assign("listZone",array("800"=>"800m","1000"=>"1000m", "1200"=>"1200m","1400"=>"1400m","1600"=>"1600m","1800"=>"1800m","2000"=>"2000m")); $smarty->assign("listAnnonce",array("10"=>"10","20"=>"20","50"=>"50")); //rss $urlRSS="lon=".$_SESSION['longitude']."&lat=".$_SESSION['latitude']. "&dist=".$dataAlerte['distance']."&type=".$dataAlerte['type']."&park=".$dataAlerte['typeParking']. "&haut=".$dataAlerte['hauteurMax']."&bail=".$dataAlerte['dureeBail']."&vehicule=".$dataAlerte['typeVehicule']. "&jours=". $dataAlerte['jours']."&hor=".$dataAlerte['horaires']; $smarty->assign("rss","../rss/annonces_filtrees.php?".$urlRSS); //pub $pub=new adsCampaign(); $smarty->assign("pub",$pub->findByGeolocalisation($_SESSION['longitude'],$_SESSION['latitude'])); $links = $pager->getLinks(); $smarty->assign("LINKS",$links['all']); $smarty->assign("liste",$data2); $smarty->assign("listep",$ortho->searchPPublic($dataAlerte['longitude'],$dataAlerte['latitude'],$_SESSION['zone'],NB_ANNONCE_PUBLIC)); $smarty->display('www/search/marecherche.tpl.htm'); } ?>