zuerst einmal willkommen im Contenido Forum.

zur Lösung deines Problems erst mal hier Lesen

und dann im Modulcode alle Referenzierungen entfernen.
Fertig!

Gruß aus Franken
Ortwin
Das kann ich dir nicht sagen, bei solche Fragen wendet man sich am Besten direkt an den Author. Alternativ kannst du aber auch gerne eine überarbeitete Version hier im Forum posten, da, soweit mir bekannt ist, alle hier zu findenden Module unter GPL stehen.Prime hat geschrieben:Gibt es für zukünftige Installationen vielleicht eine Version des w3concepts.form Moduls, in dem die arguments "richtig" übertragen werden?
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : w3concepts.form.mod2.v1
* Author : Andreas Kummer
* Copyright : mumprecht & kummer w3concepts
* Created : 15-10-2004
* Modified : 15-10-2004
************************************************
* Modified by Jan-Christoph Ihrens 2005-06-27
* See http://www.contenido.org/forum/viewtopic.php?t=5066&postdays=0&postorder=asc&start=165
* (Nickname: Enigma)
************************************************/
class w3form {
var $email, $aufgedroeselt, $form, $formularFeld;
function w3form() {
}
// PRIVATE
function sendEmail() {
// hier die Namen der Formularfelder eintragen, die nicht mit in die eMail
// aufgenommen werden sollen (z. B. Submit-Button, versteckte Formularfelder, die
// nur internen Zwecken dienen etc.)
$this->aufdroeseln($this->suppress('sent', 'submit', 'submit_form', 'form_submit', 'submit_button', 'button_submit'));
$this->generateEmailMessage();
mail($this->email['adresses'], $this->email['subject'], $this->form['mailText1'].$this->email['message'].$this->form['mailText2'], "From: {$this->email['from']['name']} <{$this->email['from']['email']}>\nReply-To: {$this->email['from']['email']}\nX-Mailer: PHP/".phpversion());
}
// PRIVATE
function aufdroeseln($aufzudroeseln, $prefix = '') {
foreach ($aufzudroeseln as $key => $value) {
if (is_array($value)) {
$this->aufdroeseln($value, $key." ");
} else {
$this->aufgedroeselt["{$prefix}{$key}"] = $value;
}
}
}
// PRIVATE
function add2Message($key, $value) {
/*
if (strlen($key) > 25 OR strlen($value) > 54) {
$this->email['message'] .= "$key\n$value\n";
} else {
$this->email['message'] .= $key;
$this->email['message'] .= str_repeat(' ', 25 - strlen($key));
$this->email['message'] .= "$value\n";
}
*/
$max_line_length = 75;
$indentation = 0;
if ('date_time' == $key) {
$value = date('d.m.Y, H:i');
}
$this->email['message'] .= $key.': ';
if ((strlen($value) <= $max_line_length - $indentation) and (strpos($value, CCS_LF) === false)) {
$this->email['message'] .= str_repeat(' ', $indentation);
}
$this->email['message'] .= $value.CCS_LF.CCS_LF;
}
// PRIVATE
function generateEmailMessage() {
if ($this->aufgedroeselt) {
foreach ($this->aufgedroeselt as $key => $value) {
$this->add2Message($key, $value);
}
}
}
// PRIVATE
function suppress() {
$suppress = func_get_args();
foreach ($_POST as $key => $value) {
if (array_search($key, $suppress) === false) {
$fields[$key] = $value;
}
}
return $fields;
}
// PUBLIC
function addEmailAdress($email) {
if (empty($this->emailAdresses)) {
$this->email['adresses'] .= $email;
} else {
$this->email['adresses'] .= ', '.$email;
}
}
// PUBLIC
function setEmailSubject($subject) {
$this->email['subject'] = $subject;
}
// PUBLIC
function setEmailFrom($email, $name) {
$this->email['from']['email'] = $email;
$this->email['from']['name'] = $name;
}
// PUBLIC
function setForm($form) {
$this->form['form'] = $form;
}
// PUBLIC
function setAnswer($answer) {
$this->form['answer'] = $answer;
}
// PUBLIC
function setBackgroundError($color) {
$this->form['colorBackgroundError'] = $color;
}
// PUBLIC
function setBorderError($color) {
$this->form['colorBorderError'] = $color;
}
// PUBLIC
function setFontError($color) {
$this->form['colorFontError'] = $color;
}
// PUBLIC
function setMessageError($activate) {
$this->form['showErrorMessage'] = (trim($activate) == 'yes');
}
// PUBLIC
function setMessageCssClassError($cssClass) {
$this->form['errorMessageCssClass'] = trim($cssClass);
}
// PUBLIC
function setMessageCssStyleError($cssStyle) {
$this->form['errorMessageCssStyle'] = trim($cssStyle);
}
// PUBLIC
function setShowDataStatus($status) {
$this->form['showData'] = (trim($status) == 'yes');
}
// PUBLIC
function setConfirmationDataTableCssClass($cssClass) {
$this->form['ConfirmationDataTableCssClass'] = trim($cssClass);
}
// PUBLIC
function setConfirmationDataTableCssStyle($cssStyle) {
$this->form['ConfirmationDataTableCssStyle'] = trim($cssStyle);
}
// PUBLIC
function setConfirmationDataTrCssClass($cssClass) {
$this->form['ConfirmationDataTrCssClass'] = trim($cssClass);
}
// PUBLIC
function setConfirmationDataTrCssStyle($cssStyle) {
$this->form['ConfirmationDataTrCssStyle'] = trim($cssStyle);
}
// PUBLIC
function setConfirmationDataThCssClass($cssClass) {
$this->form['ConfirmationDataThCssClass'] = trim($cssClass);
}
// PUBLIC
function setConfirmationDataThCssStyle($cssStyle) {
$this->form['ConfirmationDataThCssStyle'] = trim($cssStyle);
}
// PUBLIC
function setConfirmationDataTdCssClass($cssClass) {
$this->form['ConfirmationDataTdCssClass'] = trim($cssClass);
}
// PUBLIC
function setConfirmationDataTdCssStyle($cssStyle) {
$this->form['ConfirmationDataTdCssStyle'] = trim($cssStyle);
}
// PUBLIC
function setMailText1($text) {
$text = trim($text);
if ('' != $text) {
$text .= CCS_LF.CCS_LF.CCS_LF.CCS_LF;
}
$this->form['mailText1'] = $text;
}
// PUBLIC
function setMailText2($text) {
$text = trim($text);
if ('' != $text) {
$text = CCS_LF.CCS_LF.$text;
}
$this->form['mailText2'] = $text;
}
/*
// PRIVATE
function getActualErrorMessage() {
return $this->form['actualErrorMessage'];
}
*/
/* CCS begin */
// Funktion ersetzt gemäß http://www.contenido.org/forum/viewtopic.php?p=46196#46196
/*
// PRIVATE
function formularInterpretation($formular) {
$felder = split('###', $formular);
for ($i = 1; $i < count($felder); $i = $i + 2) {
$attributes = split(';', trim($felder[$i]));
foreach ($attributes as $attribut) {
$namewert = split(':', trim($attribut));
if ($namewert[0] != 'option' && $namewert[0] != 'optionvalue') {
$feld["{$felder[$i]}"]["{$namewert[0]}"] = $namewert[1];
} else {
$feld["{$felder[$i]}"]["{$namewert[0]}"][] = $namewert[1];
}
}
}
return $feld;
}
*/
// PRIVATE
function formularInterpretation($formular) {
$felder = split('###', $formular);
for ($i = 1; $i < count($felder); $i = $i + 2) {
$tempField = trim(html_entity_decode($felder[$i]));
$container = "";
if (preg_match_all('/("[^"]+")/i', $tempField, $matches)) {
$x = 0;
foreach ($matches[0] as $match) {
$x++;
$tempField = str_replace($match, "###".$x."###", $tempField);
$container[$x] = str_replace('"', '', $match);
}
}
$attributes = split(';', $tempField);
foreach ($attributes as $attribut) {
if ($attribut != "") {
$namewert = split(':', trim($attribut));
if (preg_match('/###(\d)###/i', $namewert[1] , $match)) {
$namewert[1] = $container[intval($match[1])];
}
if ($namewert[0] != 'option' && $namewert[0] != 'optionvalue') {
$feld["{$felder[$i]}"]["{$namewert[0]}"] = $namewert[1];
} else {
$feld["{$felder[$i]}"]["{$namewert[0]}"][] = $namewert[1];
}
}
}
}
return $feld;
}
/* CCS end */
// PRIVATE
function formularAusgabe($sent = false) {
// Ausgabe-Pufferung einschalten
ob_start();
echo '<form action="" method="post">';
echo '<input type="hidden" name="sent" value="true" />';
$formular = $this->form['form'];
$formulardaten = $this->formularInterpretation($formular);
$formular = split('###', $formular);
foreach ($formular as $formularteil) {
if (!empty($formulardaten["{$formularteil}"])) {
$this->formularFeld($formulardaten["{$formularteil}"], $sent);
} else {
echo $formularteil;
}
}
echo '</form>';
// Ausgabepuffer in Variable einlesen
$ccs_form_data = ob_get_contents();
// Pufferung beenden und Puffer löschen
ob_end_clean();
// wenn ein Fehler im Formular aufgetreten ist,
// Fehlermeldung über dem Formular ausgeben
if ($sent and !$this->formularVollstaendig()) {
echo '<p style="color: #FF0000">Ihre Eingaben sind unvollständig oder fehlerhaft. Bitte überprüfen Sie Ihre Eingaben!</p>'.CCS_LF;
}
// Formular ausgeben
echo $ccs_form_data;
}
// PRIVATE
function formularFeld($attribute, $sent) {
$parameter = 'name="'.$attribute['name'].'"';
if (!empty($attribute['id'])) {
$parameter .= ' id="'.$attribute['id'].'"';
$ccs_id_param = 'id="'.$attribute['id'].'"';
}
/* CCS begin */
// geändert gemäß http://www.contenido.org/forum/viewtopic.php?p=46196#46196
/*
if ($sent && !$this->formularFeldKorrekt($attribute))
$style = "style=\"background-color:{$this->form['colorError']};\"";
*/
$style = $attribute['style'];
if ($sent && !$this->formularFeldKorrekt($attribute)) {
if (!empty($this->form['colorBackgroundError'])) {
if ('' != $style) {
$style .= ' ';
}
$style .= 'background-color: '.$this->form['colorBackgroundError'].';';
}
if (!empty($this->form['colorBorderError'])) {
if ('' != $style) {
$style .= ' ';
}
$style .= 'border: 3px solid '.$this->form['colorBorderError'].';';
}
if (!empty($this->form['colorFontError'])) {
if ('' != $style) {
$style .= ' ';
}
$style .= 'color: '.$this->form['colorFontError'].';';
}
}
if ('' != $style) {
$style = 'style="'.$style.'"';
}
if (!empty($attribute['class'])) {
$style = 'class="'.$attribute['class'].'" '.$style;
}
/* CCS end */
switch ($attribute['type']) {
case 'select':
case 'password':
/* CCS begin */
// bereits unten enthalten (würde sonst doppelt erzeugt):
// case 'text':
/* CCS end */
if (!empty($attribute['size']))
$parameter .= ' size="'.$attribute['size'].'"';
break;
}
switch ($attribute['type']) {
case 'textarea':
case 'text':
if (!empty($attribute['size']))
$parameter .= ' size="'.$attribute['size'].'"';
if (!empty($attribute['value']))
$value = $attribute['value'];
if (!empty($_REQUEST["{$attribute['name']}"]))
$value = $_REQUEST["{$attribute['name']}"];
break;
}
switch ($attribute['type']) {
case 'text':
echo '<input type="text" '.$parameter.' value="'.$value.'" '.$style.' />';
break;
case 'password':
echo '<input type="password" '.$parameter.' value="'.$value.'" '.$style.' />';
break;
case 'textarea':
echo '<textarea name="'.$attribute['name'].'" '.$ccs_id_param.' cols="'; // $parameter?
echo (empty($attribute['cols'])) ? ('20') : ($attribute['cols']);
echo '" rows="';
echo (empty($attribute['rows'])) ? ('2') : ($attribute['rows']);
echo '" '.$style.'>'.$value.'</textarea>';
// wrap="virtual" nicht valide!
break;
case 'select':
echo CCS_LF.'<select '.$parameter.' '.$style.'>'.CCS_LF;
for ($i = 0; $i < count($attribute['option']); $i++) {
if (!empty($attribute['optionvalue'][$i])) {
if (!empty($_REQUEST["{$attribute['name']}"]) && $_REQUEST["{$attribute['name']}"] == $attribute['optionvalue'][$i]) {
echo '<option value="'.$attribute['optionvalue'][$i].'" selected="selected">'.$attribute['option'][$i].'</option>'.CCS_LF;
} else {
if (empty($_REQUEST["{$attribute['name']}"]) && !empty($attribute['optionvalue'][$i]) && $attribute['optionvalue'][$i] == $attribute['value']) {
echo '<option value="'.$attribute['optionvalue'][$i].'" selected="selected">'.$attribute['option'][$i].'</option>'.CCS_LF;
} else {
echo '<option value="'.$attribute['optionvalue'][$i].'">'.$attribute['option'][$i].'</option>'.CCS_LF;
}
}
} else {
if (!empty($_REQUEST["{$attribute['name']}"]) && $_REQUEST["{$attribute['name']}"] == $attribute['option'][$i]) {
echo '<option selected="selected">'.$attribute['option'][$i].'</option>'.CCS_LF;
} else {
if (empty($_REQUEST["{$attribute['name']}"]) && $attribute['option'][$i] == $attribute['value']) {
echo '<option selected="selected">'.$attribute['option'][$i].'</option>'.CCS_LF;
} else {
echo '<option>'.$attribute['option'][$i].'</option>'.CCS_LF;
}
}
}
}
echo '</select>'.CCS_LF;
break;
case 'checkbox':
$formularbezeichner = preg_split('[\[|\]]', $attribute['name']);
if ($sent) {
if ($_REQUEST["{$formularbezeichner[0]}"]["{$formularbezeichner[1]}"] == $attribute['value']) {
echo '<input type="checkbox" '.$parameter.' value="'.$attribute['value'].'" checked="checked" />';
} else {
echo '<input type="checkbox" '.$parameter.' value="'.$attribute['value'].'" />';
}
} else {
if (!empty($attribute['selected']) && $attribute['selected'] == 'true') {
echo '<input type="checkbox" '.$parameter.' value="'.$attribute['value'].'" checked="checked" />';
} else {
echo '<input type="checkbox" '.$parameter.' value="'.$attribute['value'].'" />';
}
}
break;
case 'radio':
if (!empty($_REQUEST["{$attribute['name']}"])) {
if ($_REQUEST["{$attribute['name']}"] == $attribute['value']) {
echo '<input type="radio" '.$parameter.' value="'.$attribute['value'].'" checked="checked" />';
} else {
echo '<input type="radio" '.$parameter.' value="'.$attribute['value'].'" />';
}
} else {
if (!empty($attribute['selected']) && $attribute['selected'] == 'true') {
echo '<input type="radio" '.$parameter.' value="'.$attribute['value'].'" checked="checked" />';
} else {
echo '<input type="radio" '.$parameter.' value="'.$attribute['value'].'" />';
}
}
break;
case 'datetime':
echo '<input type="hidden" name="date_time" id="date_time" value="gesendet am '.date('d.m.Y, H:i').' Uhr" />';
break;
}
if ($this->form['showErrorMessage'] and ('' != $this->form['actualErrorMessage'])) {
echo '<br />'.CCS_LF;
$cssAttributes = '';
if ('' != $this->form['errorMessageCssClass']) {
$cssAttributes .= ' class="'.$this->form['errorMessageCssClass'].'"';
}
if ('' != $this->form['errorMessageCssStyle']) {
$cssAttributes .= ' style="'.$this->form['errorMessageCssStyle'].'"';
}
echo '<span'.$cssAttributes.'">'.$this->form['actualErrorMessage'].'</span>';
}
}
// PRIVATE
function formularVollstaendig() {
$formular = $this->form['form'];
$felder = $this->formularInterpretation($formular);
foreach ($felder as $feld) {
if (!$this->formularFeldKorrekt($feld))
return false;
}
return true;
}
// PRIVATE
function add2ConfirmationPage($key, $value) {
$tr_style = '';
if ('' != $this->form['ConfirmationDataTrCssClass']) {
$tr_style .= ' class="'.$this->form['ConfirmationDataTrCssClass'].'"';
}
if ('' != $this->form['ConfirmationDataTrCssStyle']) {
$tr_style .= ' style="'.$this->form['ConfirmationDataTrCssStyle'].'"';
}
$th_style = '';
if ('' != $this->form['ConfirmationDataThCssClass']) {
$th_style .= ' class="'.$this->form['ConfirmationDataThCssClass'].'"';
}
if ('' != $this->form['ConfirmationDataThCssStyle']) {
$th_style .= ' style="'.$this->form['ConfirmationDataThCssStyle'].'"';
}
$td_style = '';
if ('' != $this->form['ConfirmationDataTdCssClass']) {
$td_style .= ' class="'.$this->form['ConfirmationDataTdCssClass'].'"';
}
if ('' != $this->form['ConfirmationDataTdCssStyle']) {
$td_style .= ' style="'.$this->form['ConfirmationDataTdCssStyle'].'"';
}
$this->confirmationDataTable .= ' <tr'.$tr_style.'>'.CCS_LF;
$this->confirmationDataTable .= ' <th'.$th_style.'>'.$key.':</th>'.CCS_LF;
$this->confirmationDataTable .= ' <td'.$td_style.'>'.$value.'</td>'.CCS_LF;
$this->confirmationDataTable .= ' </tr>'.CCS_LF;
}
// PRIVATE
function prepareConfirmationDataTable() {
$this->confirmationDataTable = '';
if ($this->aufgedroeselt) {
$table_style = '';
if ('' != $this->form['ConfirmationDataTableCssClass']) {
$table_style .= ' class="'.$this->form['ConfirmationDataTableCssClass'].'"';
}
if ('' != $this->form['ConfirmationDataTableCssStyle']) {
$table_style .= ' style="'.$this->form['ConfirmationDataTableCssStyle'].'"';
}
$this->confirmationDataTable .= '<table'.$table_style.'>'.CCS_LF;
foreach ($this->aufgedroeselt as $key => $value) {
if ('date_time' != $key) {
$this->add2ConfirmationPage($key, $value);
}
}
$this->confirmationDataTable .= '</table>'.CCS_LF;
}
}
// PRIVATE
function success() {
$this->sendEmail();
if (false !== strpos($this->form['answer'], '###sent_data###')) {
if ($this->form['showData']) {
$this->prepareConfirmationDataTable();
$this->form['answer'] = str_replace('###sent_data###', $this->confirmationDataTable, $this->form['answer']);
} else {
$this->form['answer'] = str_replace('###sent_data###', '', $this->form['answer']);
}
}
echo $this->form['answer'];
}
// PRIVATE
function formularFeldKorrekt($feld) {
$this->form['actualErrorMessage'] = '';
// prüfung, ob pflichtfeld vorhanden
if (!empty($feld['mandatory']) && $feld['mandatory'] == 'true' && empty($_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte füllen Sie dieses Feld aus!';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'given_options' && !empty($feld['possible_values'])) {
$possibleValues = explode('|', $feld['possible_values']);
foreach ($possibleValues as $key => $val) {
$possibleValues[$key] = trim($val);
}
if (!in_array($_POST["{$feld['name']}"], $possibleValues)) {
$this->form['actualErrorMessage'] = 'Es sind ausschließlich folgende Werte erlaubt (ohne die Anführungszeichen): ';
$i = 0;
foreach ($possibleValues as $val) {
$i++;
if (1 != $i) {
$this->form['actualErrorMessage'] .= ', ';
}
$this->form['actualErrorMessage'] .= '"'.$val.'"';
}
return false;
}
}
// wenn das formularfeld kein pflichtfeld und nicht vorhanden ist, true zurück geben
if (empty($_POST["{$feld['name']}"])) {
return true;
}
// regular expression prüfungen
if (!empty($feld['valid']) && $feld['valid'] == 'simpletext' && !eregi("^[ .öäüßé??????a-z0-9ÄÖÜ-]*$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte verwenden Sie ausschließlich Buchstaben, Ziffern, Bindestrich und den Punkt!';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'text' && !eregi("^[ .,;!?()öäüßé??????a-z0-9ÄÖÜ-]*$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte verwenden Sie ausschließlich Buchstaben, Ziffern sowie die Zeichen -.,;!?()';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'textwithlinefeed' && !eregi("^[ \r\n.,:;!?/()@öäüßé??????a-z0-9ÄÖÜ-]*$",$_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte verwenden Sie ausschließlich Buchstaben, Ziffern, das Leerzeichen sowie die Zeichen -.,:;!?/()@';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'integer' && !eregi("^[0-9]*$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie ausschließlich Ziffern ein!';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'float' && !eregi("^[0-9]*[.]{0,1}[0-9]*$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie ausschließlich Ziffern und ggf. einen Dezimalpunkt (kein Komma!) ein!';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'date' && !eregi("^[0-9]{1,2}.[0-9]{1,2}.[0-9]{4}$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie ein Datum in der Form TT.MM.YYYY ein!';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'email' && !eregi("^[öäüé??????_a-z0-9-]+(\.[öäüé??????_a-z0-9-]+)*@[öäüé??????a-z0-9-]+(\.[öäüé??????a-z0-9-]+)*$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie eine gültige eMail-Adresse ein!';
return false;
}
if (!empty($feld['valid']) && $feld['valid'] == 'phone' && !eregi("^([+][ ]?[1-9][0-9][ ]?[-]?[ ]?|[(]?[0][ ]?)[0-9]{2,4}[-)/ ]?[ ]?[1-9][-0-9 ]{3,16}$", $_POST["{$feld['name']}"])) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie eine gültige Telefonnummer ein!';
return false;
}
// grössenbereich bei integer und float prüfen
if (!empty($feld['minvalue']) && $_POST["{$feld['name']}"] < $feld['minvalue']) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie eine Zahl ein, die größer oder gleich '.$feld['minvalue'].' ist!';
return false;
}
if (!empty($feld['maxvalue']) && $_POST["{$feld['name']}"] > $feld['maxvalue']) {
$this->form['actualErrorMessage'] = 'Bitte geben Sie eine Zahl ein, die kleiner oder gleich '.$feld['maxvalue'].' ist!';
return false;
}
// längenbereich bei allen typen prüfen
if (!empty($feld['minlength']) && strlen($_POST["{$feld['name']}"]) < $feld['minlength']) {
$this->form['actualErrorMessage'] = 'Die Eingabe muss mindestens '.$feld['minlength'].' Zeichen lang sein!';
return false;
}
if (!empty($feld['maxlength']) && strlen($_POST["{$feld['name']}"]) > $feld['maxlength']) {
$this->form['actualErrorMessage'] = 'Die Eingabe darf höchstens '.$feld['maxlength'].' Zeichen lang sein!';
return false;
}
return true;
}
//PUBLIC
function process() {
if (!isset($_POST['sent'])) {
$this->formularAusgabe();
} elseif ($this->formularVollstaendig()) {
$this->success();
} else {
$this->formularAusgabe(true);
}
}
}
define('CCS_LF', "\n");
if ($edit) {
echo "<h1>Formularkonfiguration</h1>";
echo "<p>Hier ist das Formular einzugeben sowie der Text, der zusammen mit dem Formular ausgegeben werden soll:</p>";
echo "CMS_HTML[0]";
echo "<p>Hier ist die Ausgabe einzugeben, die erscheint, wenn das Formular erfolgreich verarbeitet wurde:</p>";
echo "CMS_HTML[1]";
} else {
$formular = new w3form();
$formular->addEmailAdress("CMS_VALUE[0]");
$formular->setEmailSubject("CMS_VALUE[1]");
if ('' == trim("CMS_VALUE[2]")) {
$ccs_sender_email = $_POST['E-Mail-Adresse'];
} else {
$ccs_sender_email = trim("CMS_VALUE[2]");
}
if ('' == trim("CMS_VALUE[3]")) {
/* $ccs_sender_name = $_POST['Vorname'].' '.$_POST['Nachname']; SJ: Name und Vorname getrennt */
$ccs_sender_name = $_POST['Name'];
} else {
$ccs_sender_name = trim("CMS_VALUE[3]");
}
$formular->setEmailFrom($ccs_sender_email, $ccs_sender_name);
$formular->setBackgroundError("CMS_VALUE[4]");
$formular->setBorderError("CMS_VALUE[5]");
$formular->setFontError("CMS_VALUE[6]");
$formular->setMessageError("CMS_VALUE[7]");
$formular->setMessageCssClassError("CMS_VALUE[8]");
$formular->setMessageCssStyleError("CMS_VALUE[9]");
$formular->setShowDataStatus("CMS_VALUE[10]");
$formular->setConfirmationDataTableCssClass("CMS_VALUE[11]");
$formular->setConfirmationDataTableCssStyle("CMS_VALUE[12]");
$formular->setConfirmationDataTrCssClass("CMS_VALUE[13]");
$formular->setConfirmationDataTrCssStyle("CMS_VALUE[14]");
$formular->setConfirmationDataThCssClass("CMS_VALUE[15]");
$formular->setConfirmationDataThCssStyle("CMS_VALUE[16]");
$formular->setConfirmationDataTdCssClass("CMS_VALUE[17]");
$formular->setConfirmationDataTdCssStyle("CMS_VALUE[18]");
$formular->setMailText1("CMS_VALUE[19]");
$formular->setMailText2("CMS_VALUE[20]");
$formular->setForm("CMS_HTML[0]");
$formular->setAnswer("CMS_HTML[1]");
$formular->process();
}
?>
Code: Alles auswählen
###name:alter; type:select; valid:text; size:1;
option:bitte auswählen;
optionvalue:0; option:bitte auswaehlen;
optionvalue:1; option:bis 13;
optionvalue:2; option:14 - 18;
optionvalue:3; option:19 - 29;
optionvalue:4; option:30 - 65;
optionvalue:5; option:65 und mehr;
optionvalue:6; value:1; minvalue:1; maxvalue:6; minlength:6; maxlength:11###
Code: Alles auswählen
<p>
<code>
<select size="1" name="alter">
<option>bitte auswaehlen</option>
<option>bis 13</option>
<option>14 - 18</option>
<option>19 - 29</option>
<option>30 - 65</option>
</select>
</code>
</p>