Mahlzeit,
kann man das Kontaktformular so ändern das eine automatische Antwort versendet wird ? Kann mir jemand helfen und aufzeigen wie das geht ?
Danke recht herzlich,
betroffene Homepage: externer Link
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); $title = $allgAr['title'].' :: Kontakt'; $hmenu = 'Kontakt'; $design = new design ( $title , $hmenu ); $design->header(); $erg = db_query("SELECT v2,t1,v1 FROM prefix_allg WHERE k = 'kontakt'"); $row = db_fetch_assoc($erg); $k = explode('#',$row['t1']); $name = ''; $mail = ''; $subject = ''; $wer = ''; $text = ''; if (!empty($_POST['wer']) AND !empty($_POST['mail']) AND !empty($_POST['txt']) AND !empty($_POST['name']) AND !empty($_POST['subject']) AND chk_antispam('contact')) { $name = escape_for_email($_POST['name']); $mail = escape_for_email($_POST['mail']); $subject = escape_for_email($_POST['subject'], true); $wer = escape_for_email($_POST['wer']); $text = $_POST['txt']; $wero = FALSE; foreach($k as $a) { $e = explode('|',$a); if (md5($e[0]) == $wer) { $wero = TRUE; $wer = $e[0]; break; } } //Deine Nachricht hier ändern $message= 'Hallo '.$name.' Danke fuer deine Email. Wir werden diese so schnell wie moeglich bearbeiten!'; $absendername= "Peter Pan"; $absenderemail= "email@email.de"; $betreff= "Automatische Email"; //Deine Nachricht hier ändern if (strpos ($text, 'Content-Type:') === FALSE AND strpos($text, 'MIME-Version:') === FALSE AND strpos($mail, '@') !== FALSE AND $wero === TRUE AND strlen($name) <= 30 AND strlen($mail) <= 30 AND strlen($text) <= 5000 AND $mail != $name AND $name != $text AND $text != $mail) { $subject = "Kontakt: " . $subject; if (icmail ($wer,$subject,$text, $name." <".$mail.">")) { echo $lang['emailsuccessfullsend']; //nachträglich ändern mail($_POST['mail'], $betreff, $message, "From: $absendername <$absendermail>"); //nachträglich ändern } else { echo 'Der Server konnte die Mail nicht versenden, teilen sie dies ggf. einem Administrator mit.'; } $name = ''; $mail = ''; $subject = ''; $wer = ''; $text = ''; } else { echo $lang['emailcouldnotsend']; } } $tpl = new tpl ( 'contact.htm' ); $tpl->out(0); $i = 1; foreach($k as $a) { $e = explode('|',$a); if ($e[0] == '' OR $e[1] == '' ) { continue; } if ($i == 1) { $c = 'checked'; } else { $c = ''; } $tpl->set_ar_out( array ('KEY' => md5($e[0]), 'VAL' => $e[1], 'c' => $c) , 1 ); $i++; } $tpl->set('name', $name); $tpl->set('mail', $mail); $tpl->set('subject', $subject); $tpl->set('text', $text); $tpl->set('ANTISPAM', get_antispam('contact',100)); $tpl->out(2); $design->footer(); ?>
<?php /** * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) * @copyright (C) 2000-2010 ilch.de * @version $Id$ */ defined('main') or die('no direct access'); $title = $allgAr[ 'title' ] . ' :: Kontakt'; $hmenu = 'Kontakt'; $header = Array( 'jquery/jquery.validate.js', 'forms/contact.js' ); $design = new design($title, $hmenu); $design->header($header); $erg = db_query("SELECT `v2`,`t1`,`v1` FROM `prefix_allg` WHERE `k` = 'kontakt'"); $row = db_fetch_assoc($erg); $k = explode('#', $row[ 't1' ]); $name = ''; $mail = ''; $subject = ''; $wer = ''; $text = ''; $fehler = ''; if(isset($_POST['submit'])) { $fehler_prefix = '· '; // Fehlerabfrage if(empty($_POST[ 'wer' ])) {$fehler .= $fehler_prefix . $lang[ 'emptywer' ].'Kontakt<br/><br>';} if(empty($_POST[ 'name' ])) {$fehler .= $fehler_prefix . $lang[ 'emptyname' ].'Gib bitte Deinen Namen an<br/><br>';} if(empty($_POST[ 'mail' ])) {$fehler .= $fehler_prefix . $lang[ 'emptyemail' ].'Deine Email bitte angeben<br/><br>';} if(empty($_POST[ 'subject' ])) {$fehler .= $fehler_prefix . $lang[ 'emptysubject' ].'Bitte einen Betreff angeben<br/><br>';} if(empty($_POST[ 'txt' ])) {$fehler .= $fehler_prefix . $lang[ 'emptymessage' ].'Du hast eine Nachricht vergessen<br/><br>';} if(chk_antispam('contact') != true) {$fehler .= $fehler_prefix . $lang[ 'incorrectspam' ].'Antispam nicht vergessen<br/><br>';} // if ($fehler == '' ) { $name = escape_for_email($_POST[ 'name' ]); $mail = escape_for_email($_POST[ 'mail' ]); $subject = escape_for_email($_POST[ 'subject' ], true); $wer = escape_for_email($_POST[ 'wer' ]); $text = $_POST[ 'txt' ]; $wero = false; foreach ($k as $a) { $e = explode('|', $a); if (md5($e[ 0 ]) == $wer) { $wero = true; $wer = $e[ 0 ]; break; } } if (strpos($text, 'Content-Type:') === false AND strpos($text, 'MIME-Version:') === false AND strpos($mail, '@') !== false AND $wero === true AND strlen($name) <= 30 AND strlen($mail) <= 30 AND strlen($text) <= 5000 AND $mail != $name AND $name != $text AND $text != $mail) { $subject = "Kontakt: " . $subject; if (icmail($wer, $subject, $text, $name . " <" . $mail . ">")) { wd('index.php?contact', $lang[ 'emailsuccessfullsend' ]); $design->footer(); } else { wd('index.php?contact', 'Der Server konnte die Mail nicht versenden, teilen sie dies ggf. einem Administrator mit.'); $design->footer(); } } else { $name = $_POST['name']; $mail = $_POST['mail']; $subject = $_POST['subject']; $wer = $_POST['wer']; $text = $_POST['txt']; echo $lang[ 'emailcouldnotsend' ]; } } else { $name = $_POST['name']; $mail = $_POST['mail']; $subject = $_POST['subject']; $wer = $_POST['wer']; $text = $_POST['txt']; } } $tpl = new tpl('contact.htm'); $tpl->out(0); $i = 1; foreach ($k as $a) { $e = explode('|', $a); if ($e[ 0 ] == '' OR $e[ 1 ] == '') { continue; } if ($i == 1) { $c = 'checked'; } else { $c = ''; } $tpl->set_ar_out(array( 'KEY' => md5($e[ 0 ]), 'VAL' => $e[ 1 ], 'c' => $c ), 1); $i++; } $tpl->set('name', $name); $tpl->set('mail', $mail); $tpl->set('subject', $subject); $tpl->set('text', $text); $tpl->set('FEHLER', '<div id="formfehler">'.$fehler.'</div>'); $tpl->set('ANTISPAM', get_antispam('contact', 100)); $tpl->out(2); $design->footer(); ?>
<?php /** * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) * @copyright (C) 2000-2010 ilch.de * @version $Id$ */ defined('main') or die('no direct access'); $title = $allgAr[ 'title' ] . ' :: Kontakt'; $hmenu = 'Kontakt'; $header = Array( 'jquery/jquery.validate.js', 'forms/contact.js' ); $design = new design($title, $hmenu); $design->header($header); $erg = db_query("SELECT `v2`,`t1`,`v1` FROM `prefix_allg` WHERE `k` = 'kontakt'"); $row = db_fetch_assoc($erg); $k = explode('#', $row[ 't1' ]); $name = ''; $mail = ''; $subject = ''; $wer = ''; $text = ''; $fehler = ''; if(isset($_POST['submit'])) { $fehler_prefix = '· '; // Fehlerabfrage if(empty($_POST[ 'wer' ])) {$fehler .= $fehler_prefix . $lang[ 'emptywer' ].'Kontakt<br/><br>';} if(empty($_POST[ 'name' ])) {$fehler .= $fehler_prefix . $lang[ 'emptyname' ].'Gib bitte Deinen Namen an<br/><br>';} if(empty($_POST[ 'mail' ])) {$fehler .= $fehler_prefix . $lang[ 'emptyemail' ].'Deine Email bitte angeben<br/><br>';} if(empty($_POST[ 'subject' ])) {$fehler .= $fehler_prefix . $lang[ 'emptysubject' ].'Bitte einen Betreff angeben<br/><br>';} if(empty($_POST[ 'txt' ])) {$fehler .= $fehler_prefix . $lang[ 'emptymessage' ].'Du hast eine Nachricht vergessen<br/><br>';} if(chk_antispam('contact') != true) {$fehler .= $fehler_prefix . $lang[ 'incorrectspam' ].'Antispam nicht vergessen<br/><br>';} // //Deine Nachricht hier ändern $message= 'Hallo '.$_POST[ 'name' ].' Danke fuer deine Email. Wir werden diese so schnell wie moeglich bearbeiten!'; $absendername= "Peter Pan"; $absenderemail= "email@email.de"; $betreff= "Automatische Email"; //Deine Nachricht hier ändern if ($fehler == '' ) { $name = escape_for_email($_POST[ 'name' ]); $mail = escape_for_email($_POST[ 'mail' ]); $subject = escape_for_email($_POST[ 'subject' ], true); $wer = escape_for_email($_POST[ 'wer' ]); $text = $_POST[ 'txt' ]; $wero = false; foreach ($k as $a) { $e = explode('|', $a); if (md5($e[ 0 ]) == $wer) { $wero = true; $wer = $e[ 0 ]; break; } } if (strpos($text, 'Content-Type:') === false AND strpos($text, 'MIME-Version:') === false AND strpos($mail, '@') !== false AND $wero === true AND strlen($name) <= 30 AND strlen($mail) <= 30 AND strlen($text) <= 5000 AND $mail != $name AND $name != $text AND $text != $mail) { $subject = "Kontakt: " . $subject; if (icmail($wer, $subject, $text, $name . " <" . $mail . ">")) { wd('index.php?contact', $lang[ 'emailsuccessfullsend' ]); mail($_POST['mail'], $betreff, $message, "From: $absendername <$absendermail>"); $design->footer(); } else { wd('index.php?contact', 'Der Server konnte die Mail nicht versenden, teilen sie dies ggf. einem Administrator mit.'); $design->footer(); } } else { $name = $_POST['name']; $mail = $_POST['mail']; $subject = $_POST['subject']; $wer = $_POST['wer']; $text = $_POST['txt']; echo $lang[ 'emailcouldnotsend' ]; } } else { $name = $_POST['name']; $mail = $_POST['mail']; $subject = $_POST['subject']; $wer = $_POST['wer']; $text = $_POST['txt']; } } $tpl = new tpl('contact.htm'); $tpl->out(0); $i = 1; foreach ($k as $a) { $e = explode('|', $a); if ($e[ 0 ] == '' OR $e[ 1 ] == '') { continue; } if ($i == 1) { $c = 'checked'; } else { $c = ''; } $tpl->set_ar_out(array( 'KEY' => md5($e[ 0 ]), 'VAL' => $e[ 1 ], 'c' => $c ), 1); $i++; } $tpl->set('name', $name); $tpl->set('mail', $mail); $tpl->set('subject', $subject); $tpl->set('text', $text); $tpl->set('FEHLER', '<div id="formfehler">'.$fehler.'</div>'); $tpl->set('ANTISPAM', get_antispam('contact', 100)); $tpl->out(2); $design->footer(); ?>
<?php # Copyright by: Manuel # Support: www.ilch.de defined ('main') or die ( 'no direct access' ); defined ('admin') or die ( 'only admin access' ); $design = new design ( 'Admins Area', 'Admins Area', 2 ); $design->header(); if (isset($_POST['name'])) { $_POST['name'] = escape($_POST['name'], 'string'); } if (isset($_POST['mail'])) { $_POST['mail'] = escape($_POST['mail'], 'string'); } switch($menu->get(1)){ case 1 : $row = db_fetch_object(db_query("SELECT t1 FROM `prefix_allg` WHERE k = 'kontakt'")); $k = explode('#',$row->t1); $k[$_GET['wo']] = $_POST['mail'].'|'.$_POST['name']; $nk = implode('#',$k); db_query("UPDATE `prefix_allg` SET t1 = '".$nk."' WHERE k = 'kontakt'"); break; case 2 : $row = db_fetch_object(db_query("SELECT t1 FROM `prefix_allg` WHERE k = 'kontakt'")); $k = explode('#',$row->t1); unset ($k[$_GET['del']]); $nk = implode('#',$k); db_query("UPDATE `prefix_allg` SET t1 = '".$nk."' WHERE k = 'kontakt'"); break; case 3 : $row = db_fetch_object(db_query("SELECT t1 FROM `prefix_allg` WHERE k = 'kontakt'")); $nk = $row->t1.'#'.$_POST['mail'].'|'.$_POST['name']; db_query("UPDATE `prefix_allg` SET t1 = '".$nk."' WHERE k = 'kontakt'"); break; case 5 : db_query('UPDATE `prefix_allg` SET '.$feld.' = "'.$ak.'" WHERE k = "kontakt"'); break; } $tpl = new tpl ( 'contact', 1); $tpl->out(0); $row = db_fetch_object(db_query("SELECT t1,v2,v1 FROM `prefix_allg` WHERE k = 'kontakt'")); $k = explode('#',$row->t1); $b = explode('#',$row->v2); $i = 0; foreach($k as $a) { $e = explode('|',$a); if ($e[0] != '' AND $e[1] != '') { $ar = array ( 'WO' => $i, 'MAIL' => $e[0], 'NAME' => $e[1] ); $tpl->set_ar_out($ar,1); } $i++; } $tpl->out(2); //-----------------------------------------------------------| $design->footer(); ?>
<?php /** * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) * @copyright (C) 2000-2010 ilch.de * @version $Id$ */ defined('main') or die('no direct access'); $title = $allgAr[ 'title' ] . ' :: Kontakt'; $hmenu = 'Kontakt'; $header = Array( 'jquery/jquery.validate.js', 'forms/contact.js' ); $design = new design($title, $hmenu); $design->header($header); $erg = db_query("SELECT `v2`,`t1`,`v1` FROM `prefix_allg` WHERE `k` = 'kontakt'"); $row = db_fetch_assoc($erg); $k = explode('#', $row[ 't1' ]); $name = ''; $mail = ''; $subject = ''; $wer = ''; $text = ''; $fehler = ''; if(isset($_POST['submit'])) { $fehler_prefix = '· '; // Fehlerabfrage if(empty($_POST[ 'wer' ])) {$fehler .= $fehler_prefix . $lang[ 'emptywer' ].'Kontakt auswählen<br/><br>';} if(empty($_POST[ 'name' ])) {$fehler .= $fehler_prefix . $lang[ 'emptyname' ].'Gib bitte Deinen Namen an<br/><br>';} if(empty($_POST[ 'mail' ])) {$fehler .= $fehler_prefix . $lang[ 'emptyemail' ].'Deine Email bitte angeben<br/><br>';} if(empty($_POST[ 'subject' ])) {$fehler .= $fehler_prefix . $lang[ 'emptysubject' ].'Bitte einen Betreff angeben<br/><br>';} if(empty($_POST[ 'txt' ])) {$fehler .= $fehler_prefix . $lang[ 'emptymessage' ].'Du hast eine Nachricht vergessen<br/><br>';} if(chk_antispam('contact') != true) {$fehler .= $fehler_prefix . $lang[ 'incorrectspam' ].'Antispam nicht vergessen<br/><br>';} // //Deine Nachricht hier ändern $message= 'Hallo '.$_POST[ 'name' ].' Danke für Ihre Kontakt Anfrage. Wir werden diese so schnell wie möglich beantworten. Freundliche Grüße von den Räubern vom Zeisigwald'; $absendername= "Vom Zeisigwald"; $absenderemail= "vomzeisigwald@online.de"; $betreff= "Bestätigung Ihrer Anfrage"; //Deine Nachricht hier ändern if ($fehler == '' ) { $name = escape_for_email($_POST[ 'name' ]); $mail = escape_for_email($_POST[ 'mail' ]); $subject = escape_for_email($_POST[ 'subject' ], true); $wer = escape_for_email($_POST[ 'wer' ]); $text = $_POST[ 'txt' ]; $wero = false; foreach ($k as $a) { $e = explode('|', $a); if (md5($e[ 0 ]) == $wer) { $wero = true; $wer = $e[ 0 ]; break; } } if (strpos($text, 'Content-Type:') === false AND strpos($text, 'MIME-Version:') === false AND strpos($mail, '@') !== false AND $wero === true AND strlen($name) <= 30 AND strlen($mail) <= 30 AND strlen($text) <= 5000 AND $mail != $name AND $name != $text AND $text != $mail) { $subject = "Kontakt: " . $subject; if (icmail($wer, $subject, $text, $name . " <" . $mail . ">")) { wd('index.php?contact', $lang[ 'emailsuccessfullsend' ]); mail($_POST['mail'], $betreff, $message, "From: $absendername <$absendermail>"); $design->footer(); } else { wd('index.php?contact', 'Der Server konnte die Mail nicht versenden, teilen sie dies ggf. einem Administrator mit.'); $design->footer(); } } else { $name = $_POST['name']; $mail = $_POST['mail']; $subject = $_POST['subject']; $wer = $_POST['wer']; $text = $_POST['txt']; echo $lang[ 'emailcouldnotsend' ]; } } else { $name = $_POST['name']; $mail = $_POST['mail']; $subject = $_POST['subject']; $wer = $_POST['wer']; $text = $_POST['txt']; } } $tpl = new tpl('contact.htm'); $tpl->out(0); $i = 1; foreach ($k as $a) { $e = explode('|', $a); if ($e[ 0 ] == '' OR $e[ 1 ] == '') { continue; } if ($i == 1) { $c = 'unchecked'; } else { $c = ''; } $tpl->set_ar_out(array( 'KEY' => md5($e[ 0 ]), 'VAL' => $e[ 1 ], 'c' => $c ), 1); $i++; } $tpl->set('name', $name); $tpl->set('mail', $mail); $tpl->set('subject', $subject); $tpl->set('text', $text); $tpl->set('FEHLER', '<div id="formfehler">'.$fehler.'</div>'); $tpl->set('ANTISPAM', get_antispam('contact', 100)); $tpl->out(2); $design->footer(); ?>
<noscript>Bitte JavaScript aktivieren</noscript> <form action="?contact" method="POST" name="contact_form" id="contact_form"> <fieldset id="contact"> <legend class="_lang_whereyouwrite"><font size="+1"><b>Kontakt auswählen</b></font></legend><br> {EXPLODE} <input id="w{KEY}" {c} type="radio" name="wer" value="{KEY}" /> <label for="w{KEY}"> {VAL}</label><br class="clear" /> {EXPLODE}<br><br><font color="#FF0000"><b>{FEHLER}</b> </font><br> <br class="clear" /> <label style="float:left; width:100px; "><label class="contact_label _lang_name"><b></label> <font size="-2">Dein Name</font></b></label> <label style="float:left; width:100px; "><input type="text" name="name" value="{name}" maxlength="30" class="input_text"></label> <br /><br> <label style="float:left; width:100px; "><label class="contact_label _lang_mail"></label> <b><font size="-2">Email</font></b></label> <input type="text" name="mail" value="{mail}" maxlength="50" class="input_text"><br /><br> <label style="float:left; width:100px; "><label class="contact_label _lang_subject"></label> <b><font size="-2">Betreff</font></b></label> <input type="text" name="subject" value="{subject}" maxlength="50" class="input_text"><br /><br> <label style="float:left; width:100px; "><label class="contact_label _lang_message"></label><b><font size="-2">Nachricht</font></b></label> <textarea cols="80" rows="10" name="txt" class="input_textarea">{text}</textarea><br /><br> {ANTISPAM} <label class="contact_label"> </label> <input name="submit" type="submit" value=" Absenden "><br class="clear" /> </fieldset> </form>
Geschlossen | ||
Zurück zu Module und Modifikationen |