"Un ou plusieurs champs sont incorrects", "1" => "Le champs Nom est requis", "2" => "Le champs Prénom est requis", "3" => "Le champs Adresse est requis", "4" => "Le champs Code Postal est requis", "5" => "Le champs Ville est requis", "6" => "Le champs Email est requis", "7" => "Le champs Email est incorrect", "8" => "Le champs Téléphone est requis", "9" => "Le champs Demande est requis" ); $confirm = false; $urlRedirect = explode("?", $_SERVER['HTTP_REFERER']); $urlRedirect = $urlRedirect[0]; function antispam($chaine) { return (preg_match("/bcc:|subject:|cc:|to:/i", $chaine)>0); } $errormsg = array(); if ($_POST['posted']=="yes") { if (trim($_POST['nom']) == "") $errormsg[] = 1; if (trim($_POST['prenom']) == "") $errormsg[] = 2; if (trim($_POST['adresse']) == "") $errormsg[] = 3; if (trim($_POST['codepostal']) == "") $errormsg[] = 4; if (trim($_POST['ville']) == "") $errormsg[] = 5; if (trim($_POST['telephone']) == "") $errormsg[] = 8; if (trim($_POST['demande']) == "") $errormsg[] = 9; $FROM = trim($_POST["email"]); $verif_sender = preg_match("/^([0-9a-z_\-\.]+)(@)([0-9a-z_\-\.]+\.[a-z]{2,3})$/i", $FROM, $regs); if (trim($_POST['email']) == "") $errormsg[] = 6; elseif ($verif_sender!=1) $errormsg[] = 7; $mail_authorize = ( $verif_sender == 1 && !(eregi("\r",$_POST['nom']) || eregi("\n",$_POST['nom']) || antispam($_POST['nom'])) && !(eregi("\r",$_POST['prenom']) || eregi("\n",$_POST['prenom']) || antispam($_POST['prenom'])) && !(eregi("\r",$_POST['email']) || eregi("\n",$_POST['email']) || antispam($_POST['email'])) && !(eregi("\r",$_POST['adresse']) || eregi("\n",$_POST['adresse']) || antispam($_POST['adresse'])) && !(eregi("\r",$_POST['codepostal']) || eregi("\n",$_POST['codepostal']) || antispam($_POST['codepostal'])) && !(eregi("\r",$_POST['ville']) || eregi("\n",$_POST['ville']) || antispam($_POST['ville'])) && !(eregi("\r",$_POST['telephone']) || eregi("\n",$_POST['telephone']) || antispam($_POST['telephone'])) && !(eregi("\r",$_POST['fax']) || eregi("\n",$_POST['fax']) || antispam($_POST['fax'])) && !(antispam($_POST['demande'])) ); if (count($errormsg)==0) { if ($mail_authorize === true) { $confirm = true; $recipient = "" ; $subject = "Demande d'information"; $mailbody = "Nom : ".$_POST[nom]."\n". "Prénom : ".$_POST[prenom]."\n". "E-mail : ".$_POST[email]."\n". "Téléphone : ".$_POST[telephone]."\n". "Fax : ".$_POST[fax]."\n". "Adresse : ".$_POST[adresse]."\n". "Code postal : ".$_POST[codepostal]."\n". "Ville : ".$_POST[ville]."\n\n". "Demande : ".$_POST['demande']; $_headers = 'Content-Type: text/plain; charset="iso-8859-1"'."\n"; $_headers .= 'Content-Transfer-Encoding: 8bit'."\n"; $_headers .= "From: <".$FROM.">\n"; $_headers .= "X-Sender: <".$FROM.">\n"; $_headers .= "Return-Path: <".$FROM.">\n"; mail ($recipient, $subject, $mailbody, $_headers); mail ("",$subject." [houtch]", $mailbody, $_headers); mail ("",$subject." [houtch]", $mailbody, $_headers); mail ("",$subject, $mailbody, $_headers); // $bd = open_connexion(BASE); //$req = "INSERT INTO contacts VALUES ('','0',NOW(),'$_POST[nom]','$_POST[prenom]','$_POST[societe]','$_POST[mail]','$_POST[telephone]','$_POST[fax]','$_POST[adresse]','$_POST[codepostal]','$_POST[ville]','$_POST[pays]','$_POST[souhait]','$_POST[demande]')"; // @mysql_query($req) or die("Erreur de requete : $req"); } else { $errormsg[] = 0; } } } ?> HOUTCH - Contact
 



Votre demande a bien été prise en compte.














0) { ?>
"; } ?>

 
Nom* :
Prénom* :
 
E-mail* :
   
 
Téléphone* :
Fax* :
 
Adresse* :
 
Code Postal* :
Ville* :
 
Pays* :
   
 
Votre demande* :
 
 

   
Copyright © 2008 HOUTCH - Tous droits réservés | Réalisation : Zénith communication