require("sessionhead.inc.php");
if ($_POST['abschicken'] != "")
{
$errorcol = "#88abc7";
$errorcode = "";
if ($_POST['Vorname'] == "") $errorcode['Vorname'] = 1;
if ($_POST['Name'] == "") $errorcode['Name'] = 1;
if ($_POST['Strasse'] == "") $errorcode['Strasse'] = 1;
if ($_POST['PLZ'] == "") $errorcode['PLZ'] = 1;
if ($_POST['Ort'] == "") $errorcode['Ort'] = 1;
if ($_POST['Email'] == "") $errorcode['Email'] = 1;
// Captcha-Check
if(isset($_SESSION['captcha_spam']) AND $_POST["sicherheitscode"] == $_SESSION['captcha_spam'])
unset($_SESSION['captcha_spam']);
else
{
if ($_POST['captcha'] == "") $errorcode['captcha'] = 1;
if ($_POST["sicherheitscode"] == "")
$captchamessage = "Bitte geben Sie den Sicherheitscode ein.";
else
$captchamessage = "Der Sicherheitscode war leider nicht richtig.
Bitte geben Sie ihn noch einmal ein.";
}
if ($errorcode == "")
{
// Anfrage senden
// $recipient = "design@jamesreadon.com"; //info@mollerus-technik.de
// $recipient = "br@delink.de"; //info@mollerus-technik.de
$recipient = "info@mollerus-technik.de";
$subject = "Anfrage von Kontakt-Formular auf www.mollerus-technik.de";
$body = "Anfrage von Kontakt-Formular auf www.mollerus-technik.de\n";
$body .= "\n";
$first = 1;
foreach ($_POST as $field => $val)
{
if ($field != "abschicken" AND $field != "sicherheitscode")
{
if ($field == "Meine_Fragen") $val = "\n---------------\n\n" . $val;
if (($field == "Internet" OR $field == "Berater" OR $field == "Sonstige" OR
$field == "Werbung" OR $field == "Freunde"))
{
if ($first == 1)
{
$body .= "Von Mollerus erfahren:\n-----------------------\n";
$first = 0;
}
$body .= "$field";
}
else
{
if ($val == "") $val = " - ";
$body .= "$field: $val";
}
if ($field == "Email") $body .= "\n\n\nAngaben zu unserem Hallenbad:\n--------------------------------\n";
if ($field == "Nutzung") $body .= "\n\n";
if ($field == "Meine_Fragen") $body .= "\n\n";
if ($field == "Wasserflaeche") $body .= " m²";
if ($field == "Whirlpool") $body .= " m²";
if ($field == "Hallentemperatur") $body .= " °C";
if ($field == "Feuchte") $body .= " %";
if ($field == "Wassertemperatur") $body .= " °C";
if ($field == "Raumvolumen_Schwimmhalle") $body .= " m³";
if ($field == "Fensterflaeche") $body .= " cm";
if ($field == "Raumvolumen_Duschraueme") $body .= " m³";
if ($field == "Heizmedium_PWW") $body .= " °C";
$body .= "\n";
}
}
$header = "MIME-Version: 1.0\r\n";
$header .= "Content-type: text/plain; charset=utf-8\r\n";
$header .= "Content-Transfer-encoding: quoted-printable\r\n";
$header .= "From: $recipient\r\n";
$header .= "Reply-To: $recipient\n";
$retval = mail ($recipient, $subject, $body, $header);
if ($retval == 1)
{
$head = "Location: 06_kontakt_finish.php";
header ($head);
exit();
}
else
$errormessage = "Leider hat das Abschicken des Formulares nicht funktioniert. Bitte versuchen Sie es noch einmal. Vielen Dank!";
}
}
?>
MOLLERUS, Lüftungs- und Klimatechnik GmbH