|
|
Ralph Ras
Boîte Postale 85
06142 VENCE Cedex
FRANCE
Tél:
Fax:
Portable:
E-mail: |
+33(0) 4 93 58 63 01
+33(0) 4 93 24 65 29
+33(0) 6 07 02 17 12
garden@ralph-ras.com |
|
if(!empty($_POST['verstuur']))
{ // Er is op de knop 'verstuur e-mail' gedrukt...
$pError = ''; // Een begin met de errors als die er zijn
$pI = 0; // Deze telt het aantal erros.
if(strlen($_POST['naam']) < 2)
{ $pError .= '- Nom '; $pI++; }
if(strlen($_POST['plaats']) < 4)
{ $pError .= '- Ville '; $pI++; }
if(strlen($_POST['telefoon']) < 3)
{ $pError .= '- Télephone '; $pI++; }
if(strlen($_POST['email']) < 6 || !ereg('@',$_POST['email']) || !ereg('.',$_POST['email']))
{ $pError .= '- E-mail '; $pI++; }
if(strlen($_POST['bericht']) < 10)
{ $pError .= '- Observations '; $pI++; }
if(!empty($pError))
{ // Als er dan toch errors zijn..
echo ($pI == 1) ? 'La case suivante doit être complétée: ' : 'Les cases suivantes doivent être complétées: '; // even kijken of het meervoud of enkelvoud is.
echo $pError; // echoën van de error(s)
}
else
{
// uiteindelijk toch mailen :)
$pHeader = "MIME-Version: 1.0\r\n";
$pHeader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$pHeader .= "To: ".$cNaam." <".$cEmail.">\r\n";
$pHeader .= "From: ".$_POST['naam']." <".$_POST['email'].">\r\n";
$keuze = (!empty($_POST['keuze'])) ? '
Sélectionnez votre choix: '.$_POST['keuze'] : '';
$naam = (!empty($_POST['naam'])) ? '
Nom: '.$_POST['naam'] : '';
$plaats = (!empty($_POST['plaats'])) ? '
Ville: '.$_POST['plaats'] : '';
$straat = (!empty($_POST['straat'])) ? '
Adresse: '.$_POST['straat'] : '';
$zip = (!empty($_POST['zip'])) ? '
Code postale: '.$_POST['zip'] : '';
$telefoon = (!empty($_POST['telefoon'])) ? '
Télephone: '.$_POST['telefoon'] : '';
$email = (!empty($_POST['email'])) ? '
E-mail: '.$_POST['email'] : '';
$opm = (!empty($_POST['bericht'])) ? '
Observations: '.$_POST['bericht'] : '';
$pBericht = 'Le message suivant vous a été envoyé par votre fichier contact:
'.$keuze.$naam.$plaats.$straat.$zip.$telefoon.$email.$opm;
mail($cEmail,$cOndPre.' '.$_POST['onderwerp'].' '.$cOndSuf,$pBericht,$pHeader);
echo 'Vos informations ont été envoyées.
L’entreprise RALPH RAS prendra contact avec vous prochainement.';
setcookie('mailform',1,time()+($cSpam*60)); // cookie zetten tegen spam
$pShow = true; // formulier wordt niet weer getoond
}
}
// Kijken of er een waarde moet worden gegeven aan velden...
$pKeuze = (isset($_POST['keuze'])) ? $_POST['keuze'] : '';
$pNaam = (isset($_POST['naam'])) ? $_POST['naam'] : '';
$pEmail = (isset($_POST['email'])) ? $_POST['email'] : '';
$pOnderwerp = (isset($_POST['onderwerp'])) ? $_POST['onderwerp'] : '';
$pPlaats = (isset($_POST['plaats'])) ? $_POST['plaats'] : '';
$pStraat = (isset($_POST['straat'])) ? $_POST['straat'] : '';
$pZip = (isset($_POST['zip'])) ? $_POST['zip'] : '';
$pTelefoon = (isset($_POST['telefoon'])) ? $_POST['telefoon'] : '';
$pBericht = (isset($_POST['bericht'])) ? $_POST['bericht'] : '';
// kijken of het cookie bestaat, zoja dan wordt het formulier niet getoond.
if(isset($_COOKIE['mailform']))
{ $pShow = true; echo 'Vous pouvez envoyer un E-mail toutes les '.$cSpam.' minutes!'; }
if(!isset($pShow))
{ // het formulier als $pShow niet bestaat.
?>
}
?>
|
 |
Team Côte d’Azur
Team Côte d'Azur Revendeur officiel pour les Alpes Maritimes, le Var et Monaco |
|