1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
|
<?
$dest="commande@erox.fr";
$Check="";
if (empty($Nom)) {
$Check.="<center><b>Vous n'avez pas indiqué votre nom !"."<BR></center></b></font>"; }
if (empty($Prenom)) {
$Check.="<center><b>Vous n'avez pas indiqué votre prònom !"."<BR></center></b>"; }
if (empty($Adresse1)) {
$Check.="<center><b>Vous n'avez pas indiqué votre adresse !"."<BR></center></b>"; }
if (empty($CodePostal)) {
$Check.="<center><b>Vous n'avez pas indiqué votre code postal !"."<BR></center></b>"; }
if (empty($Ville)) {
$Check.="<center><b>Vous n'avez pas indiqué la ville !"."<BR></center></b>"; }
if (empty($NoTelephone)) {
$Check.="<center><b>Vous n'avez pas indiqué votre numòro de tòlòphone !"."<BR></center></b>"; }
if (empty($Accord)) {
$Check.="<center><b>Vous n'avez pas coché la case acceptant les frais d'expédition !"."<BR></center></b>"; }
if (empty($Email)) {
$Check.="<center><b>Vous n'avez pas indiqué votre adresse Email ! "."<BR></center></b>"; }
echo $Check;
if (empty($Check) && ereg(".+(@.+)(\.[[:alpha:]]{2}([[:alpha:]]?))$",$Email)) {
$ok=1; }
elseif ($Check="<center><b>Vous n'avez pas rempli correctement votre adresse Email !"."<BR></center></b>" && ereg(".+(@.+)(\.[[:alpha:]]{2}([[:alpha:]]?))$",$Email)) {
$ok=false; }
else {
echo "<div align=center><B>Votre adresse Email n'est bien indiquée !</B></div>";
$ok=false; }
if($ok){
$referer= getenv("HTTP_REFERER");
$sujet= "Commande";
$body.="\nParfums erox\n";
if(count($HTTP_POST_VARS)){
while (list($key, $val) = each($HTTP_POST_VARS)){
$body.="$key : $val\n";
}
}
if(count($HTTP_GET_VARS)){
while (list($key, $val) = each($HTTP_GET_VARS)){
$body.="$key : $val\n";
}
}
/* En-tetes obligatoires du message */
$headers = "From: Formulaire<$from>\n";
$headers .= "To: Erox<$to>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-15\n";
$body.="xxxxxx\n";
if(!mail($dest,$sujet,$body,$headers)){
print "Erreur pendant la transmission <br>"; }
?>
<head>
<title>Parfums Erotiques</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<table width="756" border="0" align="center" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="583" valign="top" align="center">
<div align="center">
<p>
<font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFCC00">Nous
avons bien enregistré votre commande. Un email de confirmation vous
sera envoyé le jour de l'expédition de votre colis.
</p> </font>
</div>
</td>
</tr>
<tr>
<td width="583">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="5" color="#FFFFCC"><a href="index.html"><b>RETOUR</b></a></font></div>
</td>
</tr>
</table>
</body>
</html>
<?
}
else{
?>
<head>
<title>Parfums Erotiques</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<table width="756" border="0" align="center" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="583" valign="top" align="center">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF">Désolé,
votre commande ne nous est pas parvenue pour les raisons ci-dessus.<br>
Merci de renouveller votre commande.</font></div>
</td>
</tr>
<tr>
<td width="583">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="5" color="#FFFFFF"><a href="Commande.html"><b>RETOUR</b></a></font></div>
</td>
</tr>
</table>
</body>
</html>
<?
}?> |
Partager