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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220
|
<?PHP
if (isset($_POST["champ1"])) $champ1=trim($_POST["champ1"]);
else $champ1="";
if (isset($_POST["champ2"])) $champ2=trim($_POST["champ2"]);
else $champ2="";
if (isset($_POST["champ3"])) $champ3=trim($_POST["champ3"]);
else $champ3="";
if (isset($_POST["champ4"])) $champ4=trim($_POST["champ4"]);
else $champ4="";
if (isset($_POST["zone_email"])) $zone_email=trim($_POST["zone_email"]);
else $envoi="";
if (isset($_POST["zone_texte"])) $zone_texte=trim($_POST["zone_texte"]);
else $zone_texte="";
if (isset($_POST["envoi"])) $envoi=trim($_POST["envoi"]);
else $envoi="";
if ($envoi!="")
{
$message_remerciement=" Votre message a bien été envoyé";
$X_A = " ton non <a href="mailto:Monemailamoi@moi.com">Monemailamoi@moi.com</a>";
$X_De = "From:".$champ2." ".$champ1." <".$zone_email.">";
$Le_Objet = "Message du Site Web a votre atention\n\n\n";
$Le_Body = "Bonjour , ce message vous est envoye par \n\n";
$Le_Body .= "Nom : ".$champ1." \n\n";
$Le_Body .= "Pre-Nom : ".$champ2." \n\n";
$Le_Body .= "Membre du forum : ".$champ3." \n\n";
$Le_Body .= "Autre : ".$champ4." \n\n";
$Le_Body .= "Mail : ".$zone_email." \n\n";
$Le_Body .= "=========================== \n";
$Le_Body .= "\n".$zone_texte."\n";
$Le_Body .= "\nBonne reception.\n";
mail($X_A, $Le_Objet, $Le_Body, $X_De);
}
?>
<html>
<head>
<title>Assistant d'envoi de formulaires</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
<!--
function verifSelection()
{
if (mail_form.champ1.value == "")
{
alert("Champ invalide");
return false ;
}
if (mail_form.champ2.value == "")
{
alert("Champ invalide") ;
return false ;
}
if (mail_form.champ3.value == "")
{
alert("Champ invalide") ;
return false ;
}
if (mail_form.zone_email.value == "")
{
alert("Email invalide") ;
return false ;
}
invalidChars = " /:,;'"
for (i=0; i<invalidChars.length; i++)
{
badChar = invalidChars.charAt(i) ;
if (mail_form.zone_email.value.indexOf(badChar,0) > -1)
{
alert("Votre adresse e-mail contient des caractères invalides. Veuillez vérifier.") ;
mail_form.zone_email.focus() ;
return false ;
}
}
atPos = mail_form.zone_email.value.indexOf("@",1);
if (atPos == -1)
{
alert('Votre adresse e-mail ne contient pas le signe "@". Veuillez vérifier.') ;
mail_form.zone_email.focus() ;
return false ;
}
if (mail_form.zone_email.value.indexOf("@",atPos+1) != -1)
{
alert('Il ne doit y avoir qu\'un signe "@". Veuillez vérifier.') ;
mail_form.zone_email.focus() ;
return false ;
}
periodPos = mail_form.zone_email.value.indexOf(".",atPos) ;
if (periodPos == -1)
{
alert('Vous avez oublié le point "." après le signe "@". Veuillez vérifier.') ;
mail_form.zone_email.focus() ;
return false ;
}
if (periodPos+3 > mail_form.zone_email.value.length)
{
alert('Il doit y avoir au moins deux caractères après le signe . Veuillez vérifier.') ;
mail_form.zone_email.focus() ;
return false ;
}
if (mail_form.zone_texte.value == "")
{
alert("Message invalide") ;
return false ;
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<?php
if ($message_remerciement!="") {
echo("<font face=Verdana size=2>");
echo(stripslashes($message_remerciement));
echo("</p></body></html>");
exit();
}
?>
<body bgcolor="#000000">
<form name="mail_form" method="post" action="Contact.php" onSubmit="return verifSelection()">
<div align="center"></div>
<table width="750" border="1">
<tr>
<td width="230" bgcolor="#FFFFFF"><img src="../photos/images/anilogo.gif" width="200" height="93"></td>
<td width="286"><strong><font color="#FFFFFF" size="12" face="Georgia, Times New Roman, Times, serif">Unlimited</font></strong></td>
<td width="290"><div align="center"><strong><font color="#FFFFFF" size="7">Contact</font></strong></div></td>
</tr>
<tr>
<td colspan="3"><table width="818" border="0" align="center">
<p align="center"> </p>
<tr>
<td><font color="#FFFFFF" size="2" face="Verdana"><strong>Votre nom : </strong></font></td>
<td><input name="champ1" type="text"></td>
</tr>
<tr>
<td><font color="#FFFFFF" size="2" face="Verdana"><strong>Votre prénom : </strong></font></td>
<td><input name="champ2" type="text"></td>
</tr>
<tr>
<td><font color="#FFFFFF" size="2" face="Verdana"><strong>Etes vous membre du forum</strong></font></td>
<td><label>
<strong><font color="#FFFFFF">
</font></strong>
<input type="radio" name="radiobutton" value="radiobutton">
<strong><font color="#FFFFFF"> Oui
<input type="radio" name="radiobutton" value="radiobutton">
Non</font></strong></label></td>
</tr>
<tr>
<td><font color="#FFFFFF" size="2" face="Verdana"><strong>Votre localisation : </strong></font></td>
<td><label>
<select name="select">
<option selected>Europe</option>
<option>Afrique</option>
<option>Etats Unis</option>
<option>Asie</option>
<option>Amérique du sud</option>
<option>Russie</option>
<option>Autres pays</option>
</select>
</label></td>
</tr>
<tr>
<td><strong><font color="#FFFFFF" size="2" face="Verdana">Vous êtes : </font></strong></td>
<td><strong><font color="#FFFFFF">
<label>
<input type="radio" name="radiobutton" value="radiobutton">
</label>
Un particulier
<label>
<input type="radio" name="radiobutton" value="radiobutton">
</label>
Un professionnel)</font></strong></td>
</tr>
<tr>
<td><strong><font color="#FFFFFF" size="2" face="Verdana">Votre E-Mail : </font></strong></td>
<td><input name="zone_email22" type="text"></td>
</tr>
<tr>
<td width><strong><font color="#FFFFFF" size="2" face="Verdana">Motif de votre message : </font></strong></td>
<td width><label>
<strong><font color="#FFFFFF">Informations </font></strong>
<input type="checkbox" name="checkbox" value="checkbox">
<font color="#FFFFFF"><strong> Autorisation
<input type="checkbox" name="checkbox2" value="checkbox">
Problème Technique
<input type="checkbox" name="checkbox3" value="checkbox">
Autre demande
<input type="checkbox" name="checkbox4" value="checkbox">
</strong></font></label></td>
</tr>
<tr>
<td valign="top"><strong><font color="#FFFFFF" size="2" face="Verdana">Votre message : </font></strong></td>
<td><textarea name="textarea" cols="50" rows="10"></textarea></td>
</tr>
<tr>
<td valign="top">
<td>
<div align="left">
<input type="reset" name="Reset2" value="Effacer">
<input type="submit" name="envoi2" value="Envoyer">
</div></td></tr>
</table></td>
</tr>
</table>
<div align="center"></div>
</form>
</body>
</html> |
Partager