Hi
ich möchte im Feedbackformular Checkboxfelder einfügen und habe diesen Code benutzt, jedoch funktioniert das nicht?
<?
new CheckboxField("checkbox", "Checkbox Field")
?>
Hier der Originalcode:
/**********************************/
/* Configuration */
/* */
/* You can change this: */
/* $index = 0; (right side off) */
/**********************************/
$index = 0;
$subject = "$sitename Feedback";
$formname = ""._FBTITLE."";
/***********************************************************************************/
$opi = (empty($_POST['opi'])) ? "" : $_POST['opi'];
if (count($_POST)) mxStripSlashes($_POST);
include("header.php");
if (mxIsUser()) {
$usr = getusrinfo();
}
else {
$usr['uname'] = "";
$usr['email'] = "";
$usr['user_from'] = "";
}
$form_block = "
<center><font class=\"title\"><b>$sitename: $formname</b></font>
<br><br><font class=\"content\">"._FBTEXT2."<br><br>
<FORM METHOD=\"post\" ACTION=\"modules.php?op=modload&name=".$module_name."&file=index\">
<table width=\"90%\" border=\"0\">
<tr valign='top'>
<td width=\"25%\"><font class=\"content\">"._FBNAME.":</font></td>
<td><INPUT type=\"text\" NAME=\"sender_name\" VALUE=\"".((isset($_POST['sender_name'])) ? mxPrepareToDisplay($_POST['sender_name']) : $usr['uname'])."\" SIZE=35> <font color=\"#FF0000\">*</font></td>
</tr>
<tr valign='top'>
<td width=\"25%\"><font class=\"content\">"._WHORT.":</font></td>
<td><INPUT type=\"text\" NAME=\"sender_state\" VALUE=\"".((isset($_POST['sender_state'])) ? mxPrepareToDisplay($_POST['sender_state']) : $usr['user_from'])."\" SIZE=35> <font class=\"tiny\" color=\"#ff0000\"></font></td>
</tr>
<tr valign='top'>
<td width=\"25%\"><font class=\"content\">"._FBEMAIL.": </td>
<td><INPUT type=\"text\" NAME=\"sender_email\" VALUE=\"".((isset($_POST['sender_email'])) ? mxPrepareToDisplay($_POST['sender_email']) : $usr['email'])."\" SIZE=35> <font color=\"#FF0000\">*</font></td>
</tr>
<tr valign='top'>
<td width=\"25%\"><font class=\"content\">"._FBMESSAGE.":</td>
<td><TEXTAREA NAME=\"message\" COLS=55 ROWS=7 WRAP=virtual>".((isset($_POST['message'])) ? mxPrepareToDisplay($_POST['message']) : "")."</TEXTAREA><INPUT type=\"hidden\" name=\"opi\" value=\"ds\"> <font color=\"#FF0000\">*</font></td>
</tr>
</table>
<P><INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\""._FBSEND."\"> <input type=\"reset\" NAME=\"reset\" value=\""._FBRESET."\"></p>
</FORM></center>
";
OpenTable();
if ($opi != "ds") {
echo $form_block;
}
else if ($opi == "ds") {
$send = TRUE;
$feedback_error = "";
if (empty($_POST['sender_name'])) {
$feedback_error = "<center><font color=red>"._FBERROR_NAME."</font></center><br>";
$send = FALSE;
}
if (empty($_POST['sender_email']) || !eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $_POST['sender_email'])) {
$feedback_error .= "<center><font color=red>"._FBERROR_EMAIL."</font></center><br>";
$send = FALSE;
}
if (empty($_POST['message'])) {
$feedback_error .= "<center><font color=red>"._FBERROR_MESSAGE."</font></center><br>";
$send = FALSE;
}
$line = "\n-------------------------\n";
if ($send) {
$msg = "$sitename\n";
$msg .= ""._FBNAME." ".$_POST['sender_name']."\n";
$msg .= ""._WHORT." ".$_POST['sender_state']."\n";
$msg .= ""._FBEMAIL." ".$_POST['sender_email']."\n";
$msg .= "MESSAGE :\n$line\n".$_POST['message']."\n\n";
#$msg =$msg;
include('includes/sendmail/htmlMimeMail.php');
# Send Mail to Webmaster
$mail = new htmlMimeMail();
$mail->setFrom($_POST['sender_name'].' <'.$_POST['sender_email'].'>');
$mail->setSubject("Feedback from ".$GLOBALS['sitename']."");
$mail->setText("".strip_tags(mxHtmlEntityDecode($msg))."");
$result = $mail->send(array("$adminmail"));
$msg .= "\n$line\n"._FBMSENT1;
# Send Mail to Sender
$mail = new htmlMimeMail();
$mail->setFrom("Webmaster: ".$GLOBALS['sitename']." <".$GLOBALS['adminmail'].">");
$mail->setSubject("you have send Feedback to: ".$GLOBALS['sitename']."");
$mail->setText("Your Message:\n\n".strip_tags(mxHtmlEntityDecode($msg))."");
$result = $mail->send(array($_POST['sender_email']));
echo "<P><center><font class=\"content\">"._FBMSENT1."</font></center></p>";
echo "<P><center><font class=\"content\">"._FBMSENT2."</font></center></p>";
// echo "<P><center>you can add more text here</center></p>";
}
else {
OpenTableAl();
echo $feedback_error;
CloseTableAl();
echo "<br>$form_block";
}
}
echo "<br><center><font class=\"content\">"._GOBACK."</font></center>";
CloseTable();
include("footer.php");
?>
Dank Andy