0){ foreach(array_keys($lang) as $kl=>$vl){ $websites[$vl] = $lang[$vl]["url"]; if(mb_eregi($lang[$vl]["host"],$_SERVER['HTTP_HOST'])){ $_SESSION["version"]=$vl; } } } $iso = $_SESSION["version"]; //$_SESSION["version"] = "es"; /* FIN */ /*if(($iso=="fr" && date("Y-m-d")>="2015-02-02")){ include("index2.php"); exit; }*/ /*if(@mb_eregi($lang["es"]["host"],$_SERVER['HTTP_HOST']) && ($_SERVER['PHP_AUTH_USER']!="preview" || $_SERVER['PHP_AUTH_PW']!="es")) { header('WWW-Authenticate: Basic realm="Acces restreint"'); header('HTTP/1.0 401 Unauthorized'); exit; }*/ include("inc/mysql.php"); include("inc/fonctions.php"); include("inc/class.phpmailer.php"); include("inc/class.smtp.php"); include("inc/simple_html_dom.php"); if($_GET["old"]!=""){ $temp = explode("__",$_GET["old"]); $keywords = str_replace("_","%",$temp[0]); $search_sql = array(); $search_sql[] = "produits.nom_produit LIKE '%".$keywords."%'"; $search_sql[] = "produits.code_produit LIKE '%".$keywords."%'"; $search_sql = "(".implode(" OR ",$search_sql).")"; $res_produits = mysql_query("SELECT * FROM produits, familles WHERE ".$search_sql." AND produits.online=1 AND produits.id_famille=familles.id_famille GROUP BY produits.id_produit LIMIT 1"); if(mysql_num_rows($res_produits)>0){ $old_search = ''; header("Status: 301 Moved Permanently", false, 301); header("Location:".$lang[$iso]["urls"]["recherche"].str_replace("%"," ",$keywords)."/"); exit(); }else{ header("Location:".$url); exit(); } } // POUR LE MOTEUR DE RECHERCHE GOOGLE /*$parse = parse_url($_SERVER["HTTP_REFERER"]); if(eregi("google.fr",$_SERVER["HTTP_REFERER"])) { $keyword = ""; $search = ""; $position = 1; parse_str($parse["query"], $output); foreach($output as $key=>$value) { if($key=="q"){$keyword = $value;} if($key=="start"){$position = ($value/10)+1;} } if($keyword!=""){mysql_query("INSERT INTO google SET keyword='".mysql_escape_string($keyword)."', page='".mysql_escape_string($_SERVER["REQUEST_URI"])."', position='".mysql_escape_string($position)."', date='".mysql_escape_string(date("Y-m-d H:i:s"))."', google='fr', ip='".mysql_escape_string($_SERVER['REMOTE_ADDR'])."'");} } if(eregi("google.com",$_SERVER["HTTP_REFERER"])) { $keyword = ""; $search = ""; $position = 1; parse_str($parse["query"], $output); foreach($output as $key=>$value) { if($key=="q"){$keyword = $value;} if($key=="start"){$position = ($value/10)+1;} } if($keyword!=""){mysql_query("INSERT INTO google SET keyword='".mysql_escape_string($keyword)."', page='".mysql_escape_string($_SERVER["REQUEST_URI"])."', position='".mysql_escape_string($position)."', date='".mysql_escape_string(date("Y-m-d H:i:s"))."', google='com', ip='".mysql_escape_string($_SERVER['REMOTE_ADDR'])."'");} }*/ // FIN GOOGLE if($_POST["search"]){ if($_POST["search"]!=""){ header("Location:".$lang[$iso]["urls"]["recherche"].(trim($_POST["search"]))."/"); }else{ header("Location:".$_SERVER['REQUEST_URI']); } exit(); } if($_POST["log_login"]!="" && $_POST["log_password"]!=""){ $url_redirect = $_SERVER['REQUEST_URI']; $_SESSION["panier_msg"] = ''; $res_log = mysql_query("SELECT * FROM clients WHERE email_client='".mysql_escape_string($_POST["log_login"])."' AND password_client='".mysql_escape_string(md5($_POST["log_password"]))."' LIMIT 1"); if(mysql_num_rows($res_log)>0){ while($log = mysql_fetch_assoc($res_log)){ $_SESSION["client"] = array( "id"=>$log["id_client"], "facturation"=>array( "civilite"=>$log["civilite_client"], "nom"=>$log["nom_client"], "prenom"=>$log["prenom_client"], "societe"=>$log["societe_client"], "adresse"=>$log["adresse_client"], "adresse2"=>$log["adresse2_client"], "cp"=>$log["cp_client"], "ville"=>$log["ville_client"], "pays"=>$log["pays_client"], "telephone"=>$log["fixe_client"], "mobile"=>$log["mobile_client"], "email"=>$log["email_client"] ), "livraison"=>array( "civilite"=>$log["civilite_client"], "nom"=>$log["nom_client"], "prenom"=>$log["prenom_client"], "societe"=>$log["societe_client"], "adresse"=>$log["adresse_client"], "adresse2"=>$log["adresse2_client"], "cp"=>$log["cp_client"], "ville"=>$log["ville_client"], "pays"=>$log["pays_client"] ), "cgv"=>"non" ); } }else{ $_SESSION["error"]='logerror'; } header("Location:".$url_redirect); exit(); } ?> -
 
0
0,00 €

    © 2020 - - & - : Creation site Internet Avignon