', "\n", $body);
$body = str_replace('
', "\n", $body);
$body = strip_tags($body);
}
$subject = str_replace('\n', '', $subject);
$subject = str_replace('\r', '', $subject);
if ($html) {
$header = 'MIME-Version: 1.0' . "\n";
$header .= 'Content-type: text/html; charset=iso-8859-15'."\n";
$header .= 'From: '.$receiver.' <'.$receiver.'>'."\n";
} else {
$header = 'MIME-Version: 1.0' . "\n";
$header .= 'From: '.$receiver.' <'.$receiver.'>'."\n";
}
if (mail($receiver, $subject, $body, $header)) {
return true;
} else {
return false;
}
}
function array_stripslashes(&$var) {
if(is_string($var)) {
$var = stripslashes($var);
} else {
if(is_array($var))
foreach($var as $key => $value)
array_stripslashes($var[$key]);
}
}
if(get_magic_quotes_gpc()){
array_stripslashes($_GET);
array_stripslashes($_POST);
array_stripslashes($_REQUEST);
array_stripslashes($_COOKIE);
}
if (!empty($_POST)) {
// Prüfung für das Feld "Name"
$errors['name'] = null; if (empty($_POST['name'])) {
$error = true;
$errors['name'] = ' class="error"'; }
// Prüfung für das Feld "Vorname"
$errors['vorname'] = null; if (empty($_POST['vorname'])) {
$error = true;
$errors['vorname'] = ' class="error"'; }
// Prüfung für das Feld "Straße"
$errors['strasse'] = null; if (empty($_POST['strasse'])) {
$error = true;
$errors['strasse'] = ' class="error"'; }
// Prüfung für das Feld "Ort"
$errors['ort'] = null; if (empty($_POST['ort'])) {
$error = true;
$errors['ort'] = ' class="error"'; }
// Prüfung für das Feld "E-Mail"
$errors['email'] = null; if (empty($_POST['email'])) {
$error = true;
$errors['email'] = ' class="error"'; }
if (!empty($_POST['email']) && !check_email($_POST['email'])) {
$error = true;
$errors['email'] = ' class="error"'; }
}
$_text_name = (!empty($_POST['name']) ? htmlspecialchars($_POST['name'], ENT_QUOTES, 'iso-8859-15') : null);
$_text_vorname = (!empty($_POST['vorname']) ? htmlspecialchars($_POST['vorname'], ENT_QUOTES, 'iso-8859-15') : null);
$_text_strasse = (!empty($_POST['strasse']) ? htmlspecialchars($_POST['strasse'], ENT_QUOTES, 'iso-8859-15') : null);
$_text_ort = (!empty($_POST['ort']) ? htmlspecialchars($_POST['ort'], ENT_QUOTES, 'iso-8859-15') : null);
$_text_telefon = (!empty($_POST['telefon']) ? htmlspecialchars($_POST['telefon'], ENT_QUOTES, 'iso-8859-15') : null);
$_text_fax = (!empty($_POST['fax']) ? htmlspecialchars($_POST['fax'], ENT_QUOTES, 'iso-8859-15') : null);
$_text_email = (!empty($_POST['email']) ? htmlspecialchars($_POST['email'], ENT_QUOTES, 'iso-8859-15') : null);
?>
Vielen Dank für Ihre Nachricht.
} else { ?>Das Formular konnte leider nicht abgesendet werden. Bitte versuchen Sie es später noch einmal.
} } ?>