Contact Formular

$max) { if ($err == "") { $err = $msg->err_maxlen($max); } $err_field = $err; if ($check==true) $check = false; } if (strlen($field) < $min) { if ($min_err == "") { $min_err = $msg->err_minlen($min); } $err_field = $min_err; if ($check==true) $check = false; } } function check_mail(&$check, $fld, &$error_field, $invalidchars="", $blanks="") { global $msg; $expr = "^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z][a-z]+\$"; //echo "expr=" . $expr . "
"; if ((!$fld) || ($fld=="") || (!eregi($expr,$fld))) { if ($invalidchars > "") { $error_field = $invalidchars . "
\n"; } else { $error_field = "invalid characters
\n"; } if ($check==true) $check =false; } if (strrpos($fld,' ') > 0) { if ($blanks > "") { $error_field = $blanks . "
\n"; } else { $error_field = "blanks in e-mail
\n"; } if ($check==true) $check =false; } } if (empty($HTTP_POST_VARS["anrede"])) $HTTP_POST_VARS["anrede"]="Herr,Frau,Dr.,Prof."; if (empty($err_anrede)) $err_anrede=" "; if (empty($HTTP_POST_VARS["vorname"])) $HTTP_POST_VARS["vorname"]=""; if (empty($err_vorname)) $err_vorname=" "; if (empty($HTTP_POST_VARS["nachname"])) $HTTP_POST_VARS["nachname"]=""; if (empty($err_nachname)) $err_nachname=" "; if (empty($HTTP_POST_VARS["strasse"])) $HTTP_POST_VARS["strasse"]=""; if (empty($err_strasse)) $err_strasse=" "; if (empty($HTTP_POST_VARS["plz"])) $HTTP_POST_VARS["plz"]=""; if (empty($err_plz)) $err_plz=" "; if (empty($HTTP_POST_VARS["ort"])) $HTTP_POST_VARS["ort"]=""; if (empty($err_ort)) $err_ort=" "; if (empty($HTTP_POST_VARS["telefon"])) $HTTP_POST_VARS["telefon"]=""; if (empty($err_telefon)) $err_telefon=" "; if (empty($HTTP_POST_VARS["fax"])) $HTTP_POST_VARS["fax"]=""; if (empty($err_fax)) $err_fax=" "; if (empty($HTTP_POST_VARS["email"])) $HTTP_POST_VARS["email"]=""; if (empty($err_email)) $err_email=" "; if (empty($HTTP_POST_VARS["nachricht"])) $HTTP_POST_VARS["nachricht"]=""; if (empty($err_nachricht)) $err_nachricht=" "; if (empty($HTTP_POST_VARS["kontakt"])) $HTTP_POST_VARS["kontakt"]="Brief,Fax,Telefon,E-Mail"; if (empty($err_kontakt)) $err_kontakt=" "; if (empty($HTTP_POST_VARS["firma"])) $HTTP_POST_VARS["firma"]=""; if (empty($err_firma)) $err_firma=" "; if (empty($err_web)) $err_web=" "; $checked = true; if (isset($HTTP_POST_VARS["submit"])) { check_len($checked, $HTTP_POST_VARS["anrede"],10,$err_anrede,"Entry to long! Max.lengthens :10",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["vorname"],80,$err_vorname,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["nachname"],80,$err_nachname,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["strasse"],80,$err_strasse,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["plz"],8,$err_plz,"Entry to long! Max.lengthens:8",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["ort"],80,$err_ort,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["telefon"],80,$err_telefon,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["fax"],80,$err_fax,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["email"],80,$err_email,"Entry to long! Max.lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_mail($checked, $HTTP_POST_VARS["email"], $err_email,"Thise e-Mail contains invalid charakters or is not complete.", "This e-Mail contains spaces."); check_len($checked, $HTTP_POST_VARS["nachricht"],5000,$err_nachricht,"Entry to long! Max. lengthens:5000",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["kontakt"],80,$err_kontakt,"Entry to long! Max. lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["firma"],80, $err_firma,"Entry to long! Max. lengthens:80",0,"Input necessarily! Min. lengthens:1"); check_len($checked, $HTTP_POST_VARS["web"],80, $err_web,"Entry to long! Max. lengthens:80",0,"Input necessarily! Min. lengthens:1"); } if ( empty($HTTP_POST_VARS["submit"]) or (!$checked) ) { ?>
" method="post">
Addresses:
Company: ">
First Name: ">
Last Name: ">
Street: ">
Zip Code: ">
City: ">
Telephone: ">
Telefax: ">
E-Mail: ">
Your Website (url) ">
Your Message:
Please Reply via: >Letter
>Fax
>Telephone
>E-Mail
 

\n"; echo nl2br($msg) . "
\n"; } ?>