$sTitle = TITLE . ' - Kontakt';
$sReply = 'info@snsy.de';
$sReceiver = 'info@snsy.de';
$sSubject = 'Kontaktformular';
$bErrorAnrede = false;
$bErrorName = false;
$bErrorEmail = false;
$aFields = array('anrede', 'name', 'strasse', 'plz', 'ort', 'telefon', 'email', 'nachricht');
if (isset($_REQUEST['senden']))
{
foreach ($aFields AS $sField)
{
if (isset($_REQUEST[$sField]))
{
$_REQUEST[$sField] = trim(strip_tags($_REQUEST[$sField]));
} // if (isset($_REQUEST[$sField]))
} // foreach ($aFields AS $sField)
if ($_REQUEST['anrede']!='Frau' && $_REQUEST['anrede']!='Herr')
{
$bErrorAnrede = true;
} // if ($_REQUEST['anrede']!='Frau' || $_REQUEST['anrede']!='Herr')
if (!isset($_REQUEST['name']) || strlen($_REQUEST['name'])==0)
{
$bErrorName = true;
} // if (!isset($_REQUEST['name']) || strlen($_REQUEST['name'])==0)
if (!isset($_REQUEST['email']) || !preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $_REQUEST['email']))
{
$bErrorEmail = true;
} // if (!preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $_REQUEST['email']))
if (!$bErrorAnrede && !$bErrorName && !$bErrorEmail)
{
$sHeader = 'From:' . $_REQUEST['name'] . '<' . $_REQUEST['email'] . '>' . chr(10);
$sHeader.= 'Reply-To:' . $sReply . chr(10);
$sHeader.= 'X-Mailer: PHP/' . phpversion() . chr(10);
$sHeader.= 'X-Sender-IP: ' . $REMOTE_ADDR . chr(10);
$sHeader.= 'Content-type: text/plain' . chr(10);
$sBody = '';
reset($aFields);
foreach ($aFields AS $sField)
{
$sBody.= ucfirst($sField) . ': ' . $_REQUEST[$sField] . chr(10);
} // foreach ($aFields AS $sField)
mail($sReceiver, $sSubject, $sBody, $sHeader);
header('Location: danke');
exit;
} // if (!$bErrorAnrede && !$bErrorName && !$bErrorEmail)
} // if (isset($_REQUEST['senden']))
?>
Kontakt
Anschrift:
Sites & Systems
Kopstadtplatz 24/25
45127 Essen
Telefon: 0201 / 523 98 - 40