Müller [BR] -|- mail01 checked
Meier [BR] -|- mail02
Schmidt[BR] -|- mail03
**- Variante 02:**
Müller [BR] -|- test01*lokal:arpa checked
Meier [BR] -|- test02*lokal:arpa
Schmidt[BR] -|- test03*lokal:arpa
\\
**Checkbox Kopie an/aus**
-|-copy checked
\\
==== Empfänger-Vorlage: ====
Hallo {title} {name},
E-Mail: {email}
Kommentar:
------------------------------
{comment}
------------------------------
Die E-Mail wurde gesendet an {email_send_to}.
Das war alles - Danke.
==== Vorlage: ====
[B]{LABEL:title}[/B] *[BR]{title}[BR][BR]
[IF_ERROR]{ERROR:name}[/IF_ERROR][B]{LABEL:name}[/B] *[BR]{name}[BR][BR]
[IF_ERROR]{ERROR:email}[/IF_ERROR][B]{LABEL:email}[/B] *[BR]{email}[BR][BR]
[IF_ERROR]{ERROR:email_option}[/IF_ERROR][B]{LABEL:email_option}[/B] *[BR]{email_option}[BR]
[B]{LABEL:comment}[/B][BR]{comment}[BR][BR]
{copy_me} [B]{LABEL:copy_me}[/B][BR][BR][BR]
[IF_ERROR]{ERROR:nospam}[/IF_ERROR][B]{LABEL:nospam}[/B] *[BR]{nospam}[BR][BR]
{submIt}
\\
==== CSS: ====
input,textarea,select {
font-family: "Courier New", "Trebuchet MS", Arial, Verdana, Helvetica;
font-size: 10pt;
color : #444444;
border : 1px solid #c8c8c8;
background-color : #f7f7f7;
}
.mathspam { /* Text */
font-size: 10pt;
font-weight: normal;
vertical-align: middle;
padding: 0 0 4px 4px;
}
.mathspam .calc {
font-weight: bold;
}
~~UP~~
===== PHP-Funktion =====
==== Variante 01 ====
**Datei:** template/inc_script/frontend_init/cp_form_post_send01.php
* Das Script verlangt die Kategorie-ID in der sich der Artikel bzw. CP befindet um nicht jedes Formular zu untersuchen. \\
E-Mail-Adr."
*********************************************************************************************
*/
if ($aktion['0'] == 2) { // ID der Kategorie pruefen in dem sich der Formular-CP befindet
if( isset($_POST['email_option']) ) {
// Festlegen der E-Mail-Adressen anhand des Wertes aus dem Optionsschalter
// -----------------------------------------------------------------------
$email = array(
'mail01' => 'test01@lokal.arpa',
'mail02' => 'test02@lokal.arpa',
'mail03' => 'test03@lokal.arpa'
);
// -----------------------------------------------------------------------
// Optionswert im Array enthalten? Wenn nicht dann Fehler und Rueckspung zur Formulareingabe
if ( array_key_exists($_POST['email_option'], $email) ) {
// str_replace('NOP', mixed replace, mixed subject, [int &count])
$_POST['email_send_to'] = $email[$_POST['email_option']];
}
else // Fehler produzieren, wenn Wert aus Option nicht als Schluessel im Array enthalten
$_POST['email_option'] = '';
// Alte Version bis V1.5 r434 danach nicht mehr notwendig, siehe r435
// ---------------------------------------------------------------------------
// Wenn Schalter "Kopie an mich" gesetzt, dann E-Mail-Adr. uebernehmen
/*
if( isset($_POST['copy_me']) )
$_POST['email_copy_me'] = $_POST['email'];
else // Wenn Schalter nicht gesetzt, dann nach noreply
$_POST['email_copy_me'] = 'noreply@lokal.arpa';
*/
// ---------------------------------------------------------------------------
}
}
?>
\\
==== Variante 02 ====
**Datei:** template/inc_script/frontend_init/cp_form_post_send02.php
* Das Script verlangt die Kategorie-ID in der sich der Artikel bzw. CP befindet um nicht jedes Formular zu untersuchen. \\
\\
\\
==== Update CP Formular nach V1.5 r435 ====
Dateien die erneuert werden müssen wenn die aktive Version < V1.5 r435 ist: //([[http://code.google.com/p/phpwcms/source/detail?r=435|V1.5 r435]])
//
* **include/inc_front/content/cnt23.article.inc.php**
* Wenn die Release kleiner r427 ist: \\ Zeile 49 $form_cnt = $cnt_form['labelpos']== 2 ? render_device( $cnt_form['customform'] ) : '';ersetzen durch: $form_cnt = $cnt_form['labelpos']== 2 ? $cnt_form['customform'] : '';
* **include/inc_lang/backend/de/lang.inc.php**
* **include/inc_lang/backend/en/lang.inc.php**
* **include/inc_lib/content/cnt23.readform.inc.php**
* **include/inc_tmpl/content/cnt23.inc.php**
* Wenn die Release kleiner r427 ist kann eine Funktion aus einer neuen Datei //(>= r427)// **include/inc_front/front.func.inc.php** in die vorhandene kopiert werden. Dadurch entfällt der oben gezeigte Patch. \\ Es handelt sich um die Funktion "function render_device($string)" //(am Ende der Datei)// Dieser Codeabschnitt sollte in die vorhandene Datei front.func.inc.php übernommen werden.
\\