DA-FormMaker PHP 2.9"; die();} if (isset($_GET["action"]) && ($_GET["action"] == "captcha")) {Captcha(); die();} $errMail = ""; $errCaptcha = ""; $lstAnrede_0 = ""; $lstAnrede_1 = ""; $lstAnrede_2 = ""; $lstAnrede_3 = ""; if (isset($_POST["Anrede"])) { if ($_POST["Anrede"] == "Frau") $lstAnrede_0 = "selected"; if ($_POST["Anrede"] == "Herr") $lstAnrede_1 = "selected"; if ($_POST["Anrede"] == "Familie") $lstAnrede_2 = "selected"; if ($_POST["Anrede"] == "Firma") $lstAnrede_3 = "selected"; } if (isset($_POST["Name"])) $varName = $_POST["Name"]; else $varName = ""; if (isset($_POST["Vorname"])) $varVorname = $_POST["Vorname"]; else $varVorname = ""; if (isset($_POST["Firma"])) $varFirma = $_POST["Firma"]; else $varFirma = ""; if (isset($_POST["Ort"])) $varOrt = $_POST["Ort"]; else $varOrt = ""; if (isset($_POST["Strasse"])) $varStrasse = $_POST["Strasse"]; else $varStrasse = ""; if (isset($_POST["Telefon"])) $varTelefon = $_POST["Telefon"]; else $varTelefon = ""; if (isset($_POST["Mail"])) $varMail = $_POST["Mail"]; else $varMail = ""; if (isset($_POST["Geburtstag"])) $varGeburtstag = "checked"; else $varGeburtstag = ""; if (isset($_POST["Familienfeier"])) $varFamilienfeier = "checked"; else $varFamilienfeier = ""; if (isset($_POST["Betriebsausflug"])) $varBetriebsausflug = "checked"; else $varBetriebsausflug = ""; if (isset($_POST["Klassenausflug"])) $varKlassenausflug = "checked"; else $varKlassenausflug = ""; if (isset($_POST["Feier"])) $varFeier = "checked"; else $varFeier = ""; if (isset($_POST["sonstigerAnlass"])) $varsonstigerAnlass = "checked"; else $varsonstigerAnlass = ""; if (isset($_POST["Personenanzahl"])) $varPersonenanzahl = $_POST["Personenanzahl"]; else $varPersonenanzahl = ""; if (isset($_POST["Kalender"])) $varKalender = $_POST["Kalender"]; else $varKalender = ""; if (isset($_POST["Uhrzeit_von"])) $varUhrzeit_von = $_POST["Uhrzeit_von"]; else $varUhrzeit_von = ""; if (isset($_POST["Uhrzeit_bis"])) $varUhrzeit_bis = $_POST["Uhrzeit_bis"]; else $varUhrzeit_bis = ""; if (isset($_POST["Nachricht"])) $varNachricht = $_POST["Nachricht"]; else $varNachricht = ""; //E-Mailversand if (isset($_GET["action"]) && ($_GET["action"] == "send")) { $bFormOK = true; if (preg_match("|^[a-zA-Z0-9][a-zA-Z0-9._-]*@[a-zA-Z0-9._-]+\.[a-zA-Z]{2,6}$|",$_POST["Mail"]) == false) { $errMail = "Das ist ein Pflichtfeld."; $bFormOK = false; } if ($_POST["captcha_input"] != $_SESSION["captcha"]) { $errCaptcha = "Falsche Eingabe im Spam-Schutz-Feld. Bitte überprüfen Sie Ihre Eingaben."; $bFormOK = false; } if ($bFormOK == true) sendMail(); } //-------------------------------------------------------------------------------------------- //Funktionsteil //-------------------------------------------------------------------------------------------- function CryptString($str) { for ($i=0;$i<=strlen($str)-1;$i++) { $str[$i] = chr(23 ^ ord($str[$i])); } return $str; } function CheckTransmitField($name) { $res = true; if ($name == "redirect") $res = false; if ($name == "einleittext") $res = false; if ($name == "probe") $res = false; if ($name == "crypt") $res = false; if ($name == "ReturnToSender") $res = false; if ($name == "next") $res = false; if ($name == "typemail") $res = false; if ($name == "admin") $res = false; if ($name == "admin1") $res = false; if ($name == "admin2") $res = false; if ($name == "subject") $res = false; if ($name == "captcha_input") $res = false; if ($name == "formid") $res = false; if ($name == "settings") $res = false; if ($name == "copyfields") $res = false; if ($name == "copyip") $res = false; if ($name == "hide_empty_fields") $res = false; if ($name == "settings_encoding") $res = false; if ($name == "settings_error_iplock") $res = false; if ($name == "settings_error_fileerror") $res = false; if ($name == "settings_error_captcha") $res = false; if ($name == "PHPSESSID") $res = false; if ($name == "dropMonthSelect") $res = false; if ($name == "dropYearSelect") $res = false; if (substr($name,0,8) == "anzeige_") $res = false; return $res; } function Captcha() { $c_captcha_breite = 80; //größe Captcha Bild $c_captcha_hoehe = 25; $c_captcha_groesse = 15; //Schriftgröße Captcha Header("Content-Disposition: filename=\"captcha.png\"\r\n"); Header("Content-type: image/png"); //Bild erzeugen $im = imagecreate($c_captcha_breite,$c_captcha_hoehe); $captcha_bg_color = imagecolorallocate($im,150,150,150); imagefill($im,0,0,$captcha_bg_color); srand ((double)microtime()*1000000); //Störmuster einbringen $captcha_stoer_color = imagecolorallocate($im,100,100,100); for ($x = 0;$x<=$c_captcha_breite;$x++) for ($y = 0;$y<=$c_captcha_hoehe;$y++) { $curRand = rand(0,3); if ($curRand == 1) imagesetpixel($im,$x,$y,$captcha_stoer_color); } $captcha_color = imagecolorallocate($im,44,44,44); imagestring($im,5,15,5,$_SESSION["captcha"],$captcha_color); ImagePng($im); } function CleanXML($str) { $str = str_replace("&","&",$str); $str = str_replace("<","<",$str); $str = str_replace(">",">",$str); $str = stripslashes($str); return $str; } function sendMail() { //Textmail-Template $messageText='#SUBJECT# -----------------------------------------------------------------'; //HTML-Template $messageHTML = ' Formular
 

#SUBJECT#


#EINLEITTEXT#

#PLACEHOLDER#



Weitere Informationen:
Datum:
#DATE#
IP-Adresse:
#IP#
User-Agent:
#UA#

'; $redir = $_POST["redirect"]; $subj = $_POST["subject"]; $type = $_POST["typemail"]; $kopie_absender = $_POST["copyfields"]; $ip_informationen = $_POST["copyip"]; //Encoding auslesen, falls nicht vorhanden, dann DEFAULT auf ISO-8859-1 setzen if (isset($_POST["settings_encoding"])) $settings_encoding = $_POST["settings_encoding"]; else $settings_encoding = "iso-8859-1"; $strEinleitText = CryptString(base64_decode($_POST["einleittext"])); if ($settings_encoding == "utf-8") $strEinleitText = utf8_encode($strEinleitText); $strFormID = $_POST["formid"]; $strSettings = CryptString(base64_decode($_POST["settings"])); $returnSender = $_POST["ReturnToSender"]; if (isset($_POST["crypt"])) $cryptMail = $_POST["crypt"]; else $cryptMail = "0"; //E-Mail-Adressen auslesen if ($cryptMail == "1") { $rec1 = CryptString(base64_decode(stripslashes($_POST["admin"]))); $rec2 = CryptString(base64_decode(stripslashes($_POST["admin1"]))); $rec3 = CryptString(base64_decode(stripslashes($_POST["admin2"]))); } else { $rec1 = $_POST["admin"]; $rec2 = $_POST["admin1"]; $rec3 = $_POST["admin2"]; } if (isset($_POST["email"])) $sender = $_POST["email"]; else $sender = $rec1; $textmail = true; if ($type == "plain" || $type == "") { $fmtTrail= ""; $message= $messageText; $message.= "\n\n"; $fields = ""; foreach($_POST as $name=> $value) { $str = stripslashes($value); if (CheckTransmitField($name) == true) { //in Mail eintragen if (!(isset($_POST["hide_empty_fields"])) || (!($_POST["hide_empty_fields"]) == "-1") || ($str != "")) $fields.= "$name: $str\n\n"; //Einleitungstextersetzung durchführen $strEinleitText = str_replace('{#' . $name . '#}', $str, $strEinleitText); } } $message.= str_replace("#br#", "\n", $strEinleitText); $message.= "\n\n"; //$message.= $fields; $message.= "#fields#" . "\n"; $message.= $fmtTrail; //Anhängen der IP, Browser und Datum if ($ip_informationen == "-1") { $message.= "-----------------------------\n"; $internal_datum=date("j.n.Y"); $internal_zeit=date("H:i"); $message.= "Datum: $internal_datum | Uhrzeit: $internal_zeit" . "\n"; $message.= $_SERVER['REMOTE_ADDR'] . "\n"; $message.= $_SERVER['HTTP_USER_AGENT']; } //Replace Operationen $message = str_replace("#SUBJECT#", $subj, $message); $messageCopy = $message; //Nachrichtenkopie erzeugen und Inhalt einfügen if ($kopie_absender == "-1") { $messageCopy = str_replace("#fields#",$fields, $messageCopy); } else $messageCopy = str_replace("#fields#","", $messageCopy); $message = str_replace("#fields#",$fields, $message); $textmail = true; } if ($type == "html") { $inHtml= ""; $message= $messageHTML; if ($settings_encoding == 'utf-8') { $message = utf8_encode($message); } $message = str_replace("{#encoding#}", $settings_encoding, $message); foreach($_POST as $name=> $value) { $str = stripslashes($value); $str = str_replace("\n","
",$str); if (CheckTransmitField($name) == true) { //Daten eintragen if (!(isset($_POST["hide_empty_fields"])) || (!($_POST["hide_empty_fields"]) == "-1") || ($str != "")) { $inHtml.= "\n"; $inHtml.= "\n"; $inHtml.= "\n"; //Ersetzung in Einleitungstext $strEinleitText = str_replace('{#' . $name . '#}', $str, $strEinleitText); } } } $inHtml.= "
" . $name . ":
" . $str . "
"; //Anhängen der IP, Browser und Datum if ($ip_informationen == "-1") { $internal_datum=date("j.n.Y"); $internal_zeit=date("H:i"); $datum = $internal_datum . " | " . $internal_zeit . " Uhr \n"; $ip = $_SERVER['REMOTE_ADDR'] . "\n"; $ua = $_SERVER['HTTP_USER_AGENT']; //replace Operationen $message = str_replace("#DATE#", $datum, $message); $message = str_replace("#IP#", $ip, $message); $message = str_replace("#UA#", $ua, $message); $message = str_replace("#SUBJECT#", $subj, $message); } else { //Keine Infos, daher aus Template entfernen $start = ''; $ende = ''; $search = substr( $message, strpos( $message, $start), strpos( $message, $ende)-strpos( $message, $start) + strlen($ende) + 1 ); $message = str_replace( $search, '', $message); } $message = str_replace("#EINLEITTEXT#", str_replace("#br#", "
", $strEinleitText), $message); $message = str_replace("#SUBJECT#", $subj, $message); $messageCopy = $message; //Nachrichtenkopie erzeugen und Inhalt einfügen if ($kopie_absender == "-1") $messageCopy = str_replace("#PLACEHOLDER#", $inHtml, $messageCopy); else $messageCopy = str_replace("#PLACEHOLDER#", "", $messageCopy); $message = str_replace("#PLACEHOLDER#", $inHtml, $message); $textmail = false; } if ($type == "xml") { $message = "\n\n"; $message .= "\n"; $message .= " \n"; foreach($_POST as $name=> $value) { $str = CleanXML($value); if (CheckTransmitField($name) == true) { $message .= " <" . $name . ">" . $str . "\n"; } } //Anhängen der IP, Browser und Datum $message .= " " . time() . "\n"; $message .= " " . $_SERVER['REMOTE_ADDR'] . "\n"; $message .= " " . $_SERVER['HTTP_USER_AGENT'] . "\n"; $message .= " \n"; $message .= ""; $textmail = true; } //Anhang $anhang = false; //Über alle Felder gehen foreach ($_FILES as $value) { if (!$value['error'] and ($value['name'] != '.htaccess')) { move_uploaded_file($value['tmp_name'], "filetemp/" . $value['name']); $anhang = true; } } $mail = new sendmail(); $mail->from($sender); $mail->setEncoding($settings_encoding); $mail->to($rec1); $mail->subject($subj); $mail->text($message,$textmail,$anhang); if ($anhang == true) { foreach ($_FILES as $value) { $mail->attachment("filetemp/" . $value['name']); } } $mail->send(); if ($rec2 != "") { $mail2 = new sendmail(); $mail2->from($sender); $mail2->setEncoding($settings_encoding); $mail2->to($rec2); $mail2->subject($subj); $mail2->text($message,$textmail,$anhang); if ($anhang == true) { foreach ($_FILES as $value) { $mail2->attachment("filetemp/" . $value['name']); } } $mail2->send(); } if ($rec3 != "") { $mail3 = new sendmail(); $mail3->from($sender); $mail3->setEncoding($settings_encoding); $mail3->to($rec3); $mail3->subject($subj); $mail3->text($message,$textmail,$anhang); if ($anhang == true) { foreach ($_FILES as $value) { $mail3->attachment("filetemp/" . $value['name']); } } $mail3->send(); } //Kopie an Absender if ($returnSender == "-1") { $mail4 = new sendmail(); $mail4->from($rec1); $mail4->setEncoding($settings_encoding); $mail4->to($sender); $mail4->subject($subj); $mail4->text($messageCopy,$textmail,$anhang); $mail4->send(); } //Dateien löschen if ($anhang == true) foreach ($_FILES as $value) @unlink("filetemp/" . $value['name']); //Weiterleiten auf Bestätigungsseite header("Location:" . $redir); } //-------------------------------------------------------------------------------------------- //Klassen //-------------------------------------------------------------------------------------------- class sendmail { // Variable deklarieren var $emailheader = ""; var $emailheader2 = ""; var $textheader = ""; var $textboundary = ""; var $emailboundary = ""; var $betreff = ""; var $empfaenger = ""; var $attachment = array(); var $encoding = "iso-8859-1"; function sendmail() { $this->textboundary = uniqid(time()); $this->emailboundary = uniqid(time()); } // Von wem die Email kommt in den Header setzen function from($name) { $this->emailheader .= "From: $name\n"; $this->emailheader .= "MIME-Version: 1.0\n"; } function setEncoding($encoding) { $this->encoding = $encoding; } // Funktion um den Adressaten anzugeben function to($to) { $this->empfaenger = $to; } // Funktionn für den Betreff anzugeben function subject($subject) { $this->betreff = $subject; } // Textdaten in Email Header packen function text($text,$textmail,$anhang) { if ($textmail == false) { $this->emailheader2 .= "Content-Type: multipart/alternative; boundary=\"$this->textboundary\"\n"; $this->textheader .= "--$this->textboundary\n"; $this->textheader .= "Content-Type: text/plain; charset=\"" . $this->encoding . "\"\n"; $this->textheader .= "Content-Transfer-Enconding: quoted-printable\n\n"; $this->textheader .= strip_tags($text)."\n\n"; $this->textheader .= "--$this->textboundary\n"; $this->textheader .= "Content-Type: text/html; charset=\"" . $this->encoding . "\"\n"; $this->textheader .= "Content-Transfer-Enconding: quoted-printable\n\n"; $this->textheader .= "$text \n\n"; $this->textheader .= "--$this->textboundary--\n\n"; } else { if ($anhang == true) { $this->emailheader2 .= "Content-Type: multipart/alternative; boundary=\"$this->textboundary\"\n"; $this->textheader .= "--$this->textboundary\n"; $this->textheader .= "Content-Type: text/plain; charset=\"" . $this->encoding . "\"\n"; $this->textheader .= "Content-Transfer-Enconding: quoted-printable\n\n"; } $this->textheader .= $text . "\n\n"; if ($anhang == true) { $this->textheader .= "--$this->textboundary--\n\n"; } } } // Funktion zum anhängen für Attachments in der Email function attachment($datei) { // Überprüfen ob File Existiert if(is_file($datei)) { // Header für Attachment erzeugen $filename = str_replace("filetemp/", "", $datei); $attachment_header = "--".$this->emailboundary."\n" ; $attachment_header .= "Content-Type: application/octet-stream;\n name=\"$datei\"\n"; $attachment_header .= "Content-Transfer-Encoding: base64\n"; $attachment_header .= "Content-Disposition: attachment;\n filename=\"$filename\"\n\n"; // Daten der Datei einlesen, in das BASE64 Format formatieren und auf max 72 Zeichen pro Zeile // aufteilen $file['inhalt'] = fread(fopen($datei,"rb"),filesize($datei)); $file['inhalt'] = base64_encode($file['inhalt']); $file['inhalt'] = chunk_split($file['inhalt'],72); // Attachment mit Header in der Klassenvariable speichern $this->attachment[] = $attachment_header.$file['inhalt']."\n"; } } // Funktion zum erstellen des Kompletten Headers der Email // Senden der Email function send() { $header = $this->emailheader; $body = ""; // Überprüfen ob Attachments angehängt wurden if(count($this->attachment)>0) { $header .= "Content-Type: multipart/mixed; boundary=\"$this->emailboundary\"\n"; $body .= "--$this->emailboundary\n"; $body .= $this->emailheader2 . "\n"; $body .= $this->textheader; for($i=0;$iattachment);$i++) { $body .= $this->attachment[$i]; } $body .= "--$this->emailboundary--"; } else { $header .= $this->emailheader2; $body .= $this->textheader; } // Versenden der Mail mail("$this->empfaenger",$this->betreff,$body,$header); } } ?> Willkommen im Barfusspark Burg im Spreewald

Anfrageformular

Dies ist ein Typoblindtext. An ihm kann man sehen, ob alle Buchstaben da sind und wie sie aussehen. Manchmal benutzt man Worte wie Hamburgefonts, Rafgenduks oder Handgloves, um Schriften zu testen. Manchmal Sätze, die alle Buchstaben des Alphabets enthalten - man nennt diese Sätze »Pangrams«. b

Überschrift

Dies ist ein Typoblindtext. An ihm kann man sehen, ob alle Buchstaben da sind und wie sie aussehen. Manchmal benutzt man Worte wie Hamburgefonts, Rafgenduks oder Handgloves, um Schriften zu testen. Manchmal Sätze, die alle Buchstaben des Alphabets enthalten - man nennt diese Sätze »Pangrams«. Sehr bekannt ist dieser: The quick brown fox jumps over the lazy old dog.

 

 

 

 

 

 

 

 

 

 

 

 

Diese Seite muß noch erstellt werden.

Barfusspark am Kurfürstendamm * Inh. Susanne Jantschek * Kurfürstendamm 9 * 03096 Burg/Spreewald * Telefon: 035433/59398 * E-Mail
© 2011 webdesign cottbus