include ".setting.inc.php"; $contactRequired = array ("firma", "vorname", "name", "email"); $contactMailTo = "markus.haag@luxpanel.de"; $contactFrom = "info@luxpanel.de"; $contactSubject = "Anfrage von der Webseite"; $s = new site("Mehr Luxpanel?"); $s->setBackgroundImage("contact.jpg"); $s->header(""); if ($_SERVER["REQUEST_METHOD"] == "POST") { $versand = true; // Felder prüfen und Mail versenden! foreach($contactRequired as $field) { $$field = $_REQUEST[$field]; $versand &= $_REQUEST[$field] != ''; $errorClass[$field] = $_REQUEST[$field] == '' ? " fehler" : ""; } if ($versand) { $mailbody = new Template($cfg["root"]."tpl/kontakt.tpl"); while (list ($field, $value) = each ($_REQUEST)) { $mailbody->AddPlaceholder("%".strtoupper($field)."%", $value); } $bestellung_body = $mailbody->render(); mail($contactMailTo, $contactSubject, $bestellung_body, "From: ".$contactFrom); } } ?>