Ich habe es Dir mal als mögliches Beispiel ein Testfeld1 & Testfeld2 eingebaut! Schau es Dir mal an!
include/templates/contact.htm
<form action="?contact" method="POST">
<fieldset>
<legend>{_lang_whereyouwrite}</legend>
{EXPLODE}
<input id="w{KEY}" {c} type="radio" name="wer" value="{KEY}" style="float:left; " /><label for="w{KEY}"> {VAL}</label><br style="clear:both; " />
{EXPLODE}
<br />
<label style="float:left; width:100px; ">{_lang_name}</label><input type="text" name="name" value="{name}" maxlength="30"><br />
<label style="float:left; width:100px; ">{_lang_mail}</label><input type="text" name="mail" value="{mail}" maxlength="50"><br />
<label style="float:left; width:100px; ">{_lang_subject}</label><input type="text" name="subject" value="{subject}" maxlength="50"><br />
<label style="float:left; width:100px; ">TESTFELD1</label><input type="text" name="testfeld1" value="{testfeld1}" maxlength="50"><br />
<label style="float:left; width:100px; ">TESTFELD2</label><input type="text" name="testfeld2" value="{testfeld2}" maxlength="50"><br />
<label style="float:left; width:100px; ">{_lang_message}</label><textarea cols="40" rows="10" name="txt">{text}</textarea><br />
{ANTISPAM}
<label style="float:left; width:100px; "> </label><input type="submit" value=" Absenden "><br />
</fieldset>
</form>
Wichtig hier ist, dass ich die zusätzlichen Felder mit dem Nachrichten-Feld verbunden habe und zusammen als Info versende!
include/contents/contact.php
<?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 = '';
$testfeld1 = '';
$testfeld2 = '';
$text = '';
if (!empty($_POST['testfeld1']) AND !empty($_POST['testfeld2']) AND !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']);
$testfeld1 = escape($_POST['testfeld1'],'string');
$testfeld2 = escape($_POST['testfeld2'],'string');
$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;
$info = 'Testfeld1: '.$testfeld1.'\n';
$info .= 'Testfeld2: '.$testfeld2.'\n';
$info .= '\n';
$info .= 'Nachricht: '.$text;
if (icmail ($wer,$subject,$info, $name." <".$mail.">")) {
echo $lang['emailsuccessfullsend'];
} else {
echo 'Der Server konnte die Mail nicht versenden, teilen sie dies ggf. einem Administrator mit.';
}
$name = '';
$mail = '';
$subject = '';
$wer = '';
$testfeld1 = '';
$testfeld2 = '';
$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('testfeld1', $testfeld1);
$tpl->set('testfeld2', $testfeld2);
$tpl->set('ANTISPAM', get_antispam('contact',100));
$tpl->out(2);
$design->footer();
?>
Nicht getestet, aber hoffentlich funktionsfähig! ;-)