OPTIK PFEIFER MINDELHEIM

Maximilianstr. 69
87719 Mindelheim

Tel. 08261 - 73798 - 0

ÖFFNUNGSZEITEN

Montag bis Donnerstag
8.30 - 13.00 Uhr und 14.00 - 18.00 Uhr
Freitag
8.30 - 18.00 Uhr
Samstag
9.00 - 13.00 Uhr
 
Email Kontakt


Vielen Dank für Ihre Nachricht!
Wir werden uns schnellstmöglich um Ihr Anliegen kümmern.
Zurück zur Übersicht"; // form fields /* every form field is an array consisting of 6 elements: 1) field caption 2) field name 3) field type: line, field, radio 4) additional info: if field type is - 'radio' this field contains the radio captions/values like so: {caption1|value1} {caption2|value2} {caption3|value3}... - 'select' this field contains the radio captions/values like so: {caption1|value1} {caption2|value2} {caption3|value3}... - 'email' the field value must be a valid emailaddress 5) mandatory ('*') or not ('') 6) error message if empty on submit and set to mandatory previously */ //$fields[] = array("Company", "company", "line", "", "", ""); $fields[] = array("Name", "name", "line", "", "*", "Geben Sie bitte Ihren Namen an."); $fields[] = array("Ihr Anliegen", "request", "field", "", "*", "Textnachricht vergessen!"); //$fields[] = array("Address", "address", "line", "", "", ""); //$fields[] = array("Zip/City", "city", "line", "", "", ""); $fields[] = array("Telefon", "phone", "line", "", "", "Telefonnummer vergessen."); $fields[] = array("Email", "email", "line", "email", "", "Email Adresse fehlerhaft!"); //$fields[] = array("Reply by", "replyby", "radio", "{Email|by email}{Phone|by phone}{Post|by post}", "*", "Please select a reply mode"); //$fields[] = array("Income", "income", "select", "{-- please choose --|}{more than $30'000|30000}{more than $50'000|50000}{more than $70'000|70000}", "", "Please select your income"); // ################ END CONFIG ########################################################## // ####################################################################################### $version = "1.3"; function spaces($num, $fill=" "){ $foo=""; for ($i=0; $i<$num; $i++) $foo.=$fill; return $foo; } function isValidEmail($addr){ if(eregi("^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,4}$", $addr)) return true; else return false; } // start form evaluation unset($error); if ($_REQUEST['do']=="send"){ $error = false; $fromAddress = ""; $message = ""; foreach ($fields as $field){ if ($field[4] == "*"){ if ($field[3] == "email"){ if (!isValidEmail($_REQUEST[$field[1]])) $error[$field[1]] = $field[5]; }else{ if ($_REQUEST[$field[1]] == "") $error[$field[1]] = $field[5]; } } } if ($error === false){ $message = $emailSubject." \n"; for ($i = 0; $i < strlen($emailSubject); $i++) $message .= "*"; $message .= " \n\n$msgDate:".spaces($msgIndent-strlen($msgDate)).date($dateFormat); foreach ($fields as $field){ $message .= "\n".$field[0].":".spaces($msgIndent-strlen($field[0])); if ($field[3] == "email"){ $message .= "mailto:".$_REQUEST[$field[1]]; $fromAddress = "From: ".$_REQUEST[$field[1]]; }else $message .= $_REQUEST[$field[1]]; $message .= " "; } mail($targetAddress, $emailSubject, $message, $fromAddress); echo $txtThankyou; } } if ($error!==false){ // draw form echo '

Füllen Sie bitte mindestens die Felder "Name" und "Anliegen" aus. Falls Sie von uns eine Antwort erhalten moechten, so sollten Sie entweder Ihre E-mail Adresse oder Telefonnummer angeben.

'; echo "\n\n \n\n"; echo "
\n"; echo "\n"; foreach ($fields as $field){ echo "\n\n"; } //echo "\n"; echo "\n"; echo "
".$field[0].$field[4]." "; switch ($field[2]){ case "line": echo ""; if (isset($error[$field[1]])) echo "
".$error[$field[1]]."
"; break; case "field": echo ""; if (isset($error[$field[1]])) echo "
".$error[$field[1]]."
"; break; case "radio": preg_match_all("/\{(.*?)\}/", $field[3], $foo); $options = $foo[1]; $i=1; foreach ($options as $opt){ $opt = explode("|", $opt); $label = $opt[0]; $value = (isset($opt[1])) ? $opt[1] : $opt[0]; $checked = ($_REQUEST[$field[1]] == $value) ? "checked" : ""; echo "   "; $i++; } if (isset($error[$field[1]])) echo "
".$error[$field[1]]."
"; break; case "select": preg_match_all("/\{(.*?)\}/", $field[3], $foo); $options = $foo[1]; $i=1; echo "\n\n"; if (isset($error[$field[1]])) echo "
".$error[$field[1]]."
"; break; } echo "
 * $txtMandatory
 \n"; echo "
\n"; echo "
\n"; echo "\n \n\n"; } /* ######################### END Contact Form ########################## ##################################################################### */ ?>