cl_contact_form/xml/CL_Contactform_package.xml

509 Zeilen
23 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<modulepackage><package_guid/>
<package_data/>
<module><name>CL Contactform</name>
<description>&lt;Ihre Modulbeschreibung&gt;
Autor:
Version:</description>
<type>Content</type>
<input>?&gt;&lt;?php
/**
* Module cl-contactform input
*
* @author Ortwin Pinke &lt;info@php-backoffice.de&gt;
*
* based on w3concepts.form.v1 from Andreas Kummer (2004-08-20)
* modified and adapted to Contenido 4.8 under PHP 5.x by Murat Purc (2013-08-24)
*/
cInclude(&#039;frontend&#039;, &#039;includes/class.input.helper.php&#039;);
$oCfgTable = new UI_Config_Table();
$oField = new cHTMLTextbox(&quot;CMS_VAR[0]&quot;, &quot;CMS_VALUE[0]&quot;);
$oField-&gt;setWidth(30);
$oCfgTable-&gt;setCell(0, 0, mi18n(&quot;Zieladresse (alias@mydomain.com):&quot;));
$oCfgTable-&gt;setCell(0, 1, $oField-&gt;render());
$oField = new cHTMLTextbox(&quot;CMS_VAR[1]&quot;, &quot;CMS_VALUE[1]&quot;);
$oField-&gt;setWidth(30);
$oCfgTable-&gt;setCell(1, 0, mi18n(&quot;Betreff:&quot;));
$oCfgTable-&gt;setCell(1, 1, $oField-&gt;render());
$oField = new cHTMLTextbox(&quot;CMS_VAR[2]&quot;, &quot;CMS_VALUE[2]&quot;);
$oField-&gt;setWidth(30);
$oCfgTable-&gt;setCell(2, 0, mi18n(&quot;Antwortadresse (alias@mydomain.com):&quot;));
$oCfgTable-&gt;setCell(2, 1, $oField-&gt;render());
$oField = new cHTMLTextbox(&quot;CMS_VAR[3]&quot;, &quot;CMS_VALUE[3]&quot;);
$oField-&gt;setWidth(30);
$oCfgTable-&gt;setCell(3, 0, mi18n(&quot;Emailname (z.B. Vorname Name):&quot;));
$oCfgTable-&gt;setCell(3, 1, $oField-&gt;render());
$oField = new cHTMLTextbox(&quot;CMS_VAR[4]&quot;, &quot;CMS_VALUE[4]&quot;);
$oField-&gt;setWidth(8);
$oCfgTable-&gt;setCell(4, 0, mi18n(&quot;Hintergrundfarbe bei Fehlern (z.B. red):&quot;));
$oCfgTable-&gt;setCell(4, 1, $oField-&gt;render());
$oCfgTable-&gt;render(true);
?&gt;&lt;?php</input>
<output>&lt;?php
/**
* Module cl-contactform output
*
* @author Ortwin Pinke &lt;info@php-backoffice.de&gt;
*
* based on w3concepts.form.v1 from Andreas Kummer (2004-08-20)
* modified and adapted to Contenido 4.8 under PHP 5.x by Murat Purc (2013-08-24)
*/
use PHPMailer\PHPMailer\PHPMailer;
$sFrontEndPath = cRegistry::getClientConfig(cRegistry::getClientId())[&#039;path&#039;][&#039;frontend&#039;] . &#039;securimage&#039; . DIRECTORY_SEPARATOR;
$captchaInstalled = false;
if (is_readable($sFrontEndPath)) {
require_once $sFrontEndPath . &#039;securimage.php&#039;;
require_once $sFrontEndPath . &#039;CaptchaObject.php&#039;;
require_once $sFrontEndPath . &#039;StorageAdapter/AdapterInterface.php&#039;;
$captchaInstalled = true;
}
class w3form
{
private array $email = [&#039;adresses&#039; =&gt; &#039;&#039;, &#039;from&#039; =&gt; [&#039;name&#039; =&gt; &#039;&#039;, &#039;email&#039; =&gt; &#039;&#039;], &#039;message&#039; =&gt; &#039;&#039;, &#039;subject&#039; =&gt; &#039;&#039;];
private array $unraveled = [];
private array $form = [&#039;form&#039; =&gt; &#039;&#039;, &#039;answer&#039; =&gt; &#039;&#039;, &#039;colorError&#039; =&gt; &#039;&#039;];
public function __construct(private bool $captchaInstalled)
{
}
private function sendEmail(): bool
{
$this-&gt;unravel($this-&gt;suppress(&#039;sent&#039;));
$this-&gt;generateEmailMessage();
$oMailer = new PHPMailer();
$oMailer-&gt;CharSet = &quot;UTF-8&quot;;
$oMailer-&gt;AddAddress($this-&gt;email[&#039;adresses&#039;]);
$oMailer-&gt;From = $this-&gt;email[&#039;from&#039;][&#039;email&#039;];
$oMailer-&gt;FromName = $this-&gt;email[&#039;from&#039;][&#039;name&#039;];
$oMailer-&gt;Subject = $this-&gt;email[&#039;subject&#039;];
$oMailer-&gt;Body = $this-&gt;email[&#039;message&#039;];
if ($oMailer-&gt;send()) {
return true;
}
return false;
}
private function unravel($toUnravel, $prefix = &#039;&#039;): void
{
foreach ($toUnravel as $key =&gt; $value) {
if (is_array($value)) {
$this-&gt;unravel($value, $key . &#039; &#039;);
} else {
$this-&gt;unraveled[&quot;{$prefix}{$key}&quot;] = $value;
}
}
}
private function add2Message($key, $value): void
{
if (strlen($key) &gt; 25 or strlen($value) &gt; 54) {
$this-&gt;email[&#039;message&#039;] .= &quot;$key\n$value\n&quot;;
} else {
$this-&gt;email[&#039;message&#039;] .= $key;
$this-&gt;email[&#039;message&#039;] .= str_repeat(&#039; &#039;, 25 - strlen($key));
$this-&gt;email[&#039;message&#039;] .= &quot;$value\n&quot;;
}
}
private function generateEmailMessage(): void
{
if ($this-&gt;unraveled)
foreach ($this-&gt;unraveled as $key =&gt; $value) {
$this-&gt;add2Message($key, $value);
}
}
private function suppress(): array
{
$fields = [];
$suppress = func_get_args();
foreach ($_POST as $key =&gt; $value) {
if (array_search($key, $suppress) === false)
$fields[$key] = $value;
}
return $fields;
}
public function addEmailAdress($email): void
{
if (empty($this-&gt;emailAdresses)) {
$this-&gt;email[&#039;adresses&#039;] .= &quot;$email&quot;;
} else {
$this-&gt;email[&#039;adresses&#039;] .= &quot;, $email&quot;;
}
}
public function setEmailSubject($subject): void
{
$this-&gt;email[&#039;subject&#039;] = $subject;
}
public function setEmailFrom($email, $name): void
{
$this-&gt;email[&#039;from&#039;][&#039;email&#039;] = $email;
$this-&gt;email[&#039;from&#039;][&#039;name&#039;] = $name;
}
public function setForm($form): void
{
$this-&gt;form[&#039;form&#039;] = $form;
}
public function setAnswer($answer): void
{
$this-&gt;form[&#039;answer&#039;] = $answer;
}
public function setBackgroundError($color): void
{
$this-&gt;form[&#039;colorError&#039;] = $color;
}
public function formInterpretation(&amp;$form): array
{
$fields = explode(&#039;###&#039;, $form);
$field = [];
for ($i = 1; $i &lt; count($fields); $i = $i + 2) {
$attribute = explode(&#039;;&#039;, trim($fields[$i]));
foreach ($attribute as $attribute) {
$nameValue = explode(&#039;:&#039;, trim($attribute));
if ($nameValue[0] != &#039;option&#039; &amp;&amp; $nameValue[0] != &#039;optionvalue&#039;) {
$field[&quot;{$fields[$i]}&quot;][&quot;{$nameValue[0]}&quot;] = $nameValue[1];
} else {
$field[&quot;{$fields[$i]}&quot;][&quot;{$nameValue[0]}&quot;][] = $nameValue[1];
}
}
}
return $field;
}
public function formOutput($sent = false): void
{
echo &#039;&lt;div class=&quot;textItem secondItem&quot;&gt;&lt;form action=&quot;&quot; method=&quot;POST&quot; class=&quot;form-horizontal&quot;&gt;&#039;;
echo &#039;&lt;input type=&quot;hidden&quot; name=&quot;sent&quot; value=&quot;true&quot; /&gt;&#039;;
$form = $this-&gt;form[&#039;form&#039;];
$formData = $this-&gt;formInterpretation($form);
$form = explode(&#039;###&#039;, $form);
foreach ($form as $item) {
if (!empty($formData[&quot;{$item}&quot;])) {
$this-&gt;formField($formData[&quot;{$item}&quot;], $sent);
} else {
echo $item;
}
}
echo &#039;&lt;/form&gt;&lt;/div&gt;&#039;;
}
public function formField($attribute, $sent): void
{
$style = &#039;&#039;;
$value = &#039;&#039;;
$parameter = &quot;name=\&quot;{$attribute[&#039;name&#039;]}\&quot;&quot;;
if ($sent &amp;&amp; !$this-&gt;formFieldCorrect($attribute))
$style = &quot;style=\&quot;background-color:{$this-&gt;form[&#039;colorError&#039;]};\&quot;&quot;;
switch ($attribute[&#039;type&#039;]) {
case &#039;select&#039;:
case &#039;password&#039;:
case &#039;text&#039;:
if (!empty($attribute[&#039;size&#039;]))
$parameter .= &quot; size=\&quot;{$attribute[&#039;size&#039;]}\&quot;&quot;;
break;
}
switch ($attribute[&#039;type&#039;]) {
case &#039;textarea&#039;:
case &#039;text&#039;:
if (!empty($attribute[&#039;size&#039;]))
$parameter .= &quot; size=\&quot;{$attribute[&#039;size&#039;]}\&quot;&quot;;
if (!empty($attribute[&#039;value&#039;]))
$value = $attribute[&#039;value&#039;];
if (!empty($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;]))
$value = $_POST[&quot;{$attribute[&#039;name&#039;]}&quot;];
break;
}
switch ($attribute[&#039;type&#039;]) {
case &#039;captcha&#039;:
if ($this-&gt;captchaInstalled) {
if ($sent) {
$captcha = @$_POST[&#039;ct_captcha&#039;];
$capId = @$_POST[&#039;captcha_id&#039;];
$securimage = new Securimage();
if (!$securimage-&gt;check($captcha)) {
echo &#039;&lt;style&gt;&#039;
. &#039;#captcha_code {background-color: &#039; . $this-&gt;form[&#039;colorError&#039;] . &#039;}&#039;
. &#039;&lt;/style&gt;&#039;;
}
}
// show captcha HTML using Securimage::getCaptchaHtml()
$options = [];
$options[&#039;input_name&#039;] = &#039;ct_captcha&#039;; // change name of input element for form post input_text
$options[&#039;input_text&#039;] = mi18n(&quot;Zeichen eingeben&quot;);
$options[&#039;input_required&#039;] = false;
if (!empty($_SESSION[&#039;ctform&#039;][&#039;captcha_error&#039;])) {
// error html to show in captcha output
$options[&#039;error_html&#039;] = $_SESSION[&#039;ctform&#039;][&#039;captcha_error&#039;];
}
echo &quot;&lt;div id=&#039;captcha_container_1&#039;&gt;\n&quot;;
echo Securimage::getCaptchaHtml($options);
echo &quot;\n&lt;/div&gt;\n&quot;;
}
break;
case &#039;text&#039;:
echo &quot;&lt;input type=\&quot;text\&quot; $parameter value=\&quot;$value\&quot; $style /&gt;&quot;;
break;
case &#039;password&#039;:
echo &quot;&lt;input type=\&quot;password\&quot; $parameter value=\&quot;$value\&quot; $style /&gt;&quot;;
break;
case &#039;textarea&#039;:
echo &quot;&lt;textarea name=\&quot;{$attribute[&#039;name&#039;]}\&quot; cols=\&quot;&quot;;
echo (empty($attribute[&#039;cols&#039;])) ? (&#039;20&#039;) : ($attribute[&#039;cols&#039;]);
echo &quot;\&quot; rows=\&quot;&quot;;
echo (empty($attribute[&#039;rows&#039;])) ? (&#039;2&#039;) : ($attribute[&#039;rows&#039;]);
echo &quot;\&quot; wrap=\&quot;virtual\&quot; $style&gt;$value&lt;/textarea&gt;&quot;;
break;
case &#039;select&#039;:
echo &quot;&lt;select $parameter $style&gt;&quot;;
for ($i = 0; $i &lt; (is_countable($attribute[&#039;option&#039;]) ? count($attribute[&#039;option&#039;]) : 0); $i++) {
if (!empty($attribute[&#039;optionvalue&#039;][$i])) {
if (!empty($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;]) &amp;&amp; $_POST[&quot;{$attribute[&#039;name&#039;]}&quot;] == $attribute[&#039;optionvalue&#039;][$i]) {
echo &quot;&lt;option value=\&quot;{$attribute[&#039;optionvalue&#039;][$i]}\&quot; selected=\&quot;selected\&quot;&gt;{$attribute[&#039;option&#039;][$i]}&lt;/option&gt;\n&quot;;
} else {
if (empty($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;]) &amp;&amp; !empty($attribute[&#039;optionvalue&#039;][$i]) &amp;&amp; $attribute[&#039;optionvalue&#039;][$i] == $attribute[&#039;value&#039;]) {
echo &quot;&lt;option value=\&quot;{$attribute[&#039;optionvalue&#039;][$i]}\&quot; selected=\&quot;selected\&quot;&gt;{$attribute[&#039;option&#039;][$i]}&lt;/option&gt;\n&quot;;
} else {
echo &quot;&lt;option value=\&quot;{$attribute[&#039;optionvalue&#039;][$i]}\&quot;&gt;{$attribute[&#039;option&#039;][$i]}&lt;/option&gt;\n&quot;;
}
}
} else {
if (!empty($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;]) &amp;&amp; $_POST[&quot;{$attribute[&#039;name&#039;]}&quot;] == $attribute[&#039;option&#039;][$i]) {
echo &quot;&lt;option selected=\&quot;selected\&quot;&gt;{$attribute[&#039;option&#039;][$i]}&lt;/option&gt;\n&quot;;
} else {
if (empty($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;]) &amp;&amp; $attribute[&#039;option&#039;][$i] == $attribute[&#039;value&#039;]) {
echo &quot;&lt;option selected=\&quot;selected\&quot;&gt;{$attribute[&#039;option&#039;][$i]}&lt;/option&gt;\n&quot;;
} else {
echo &quot;&lt;option&gt;{$attribute[&#039;option&#039;][$i]}&lt;/option&gt;\n&quot;;
}
}
}
}
echo &quot;&lt;/select&gt;&quot;;
break;
case &#039;checkbox&#039;:
$formId = preg_split(&#039;[\[|\]]&#039;, $attribute[&#039;name&#039;]);
if ($sent) {
if ($_POST[&quot;{$formId[0]}&quot;][&quot;{$formId[1]}&quot;] == $attribute[&#039;value&#039;]) {
echo &quot;&lt;input type=\&quot;checkbox\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot; checked=\&quot;checked\&quot;/&gt;&quot;;
} else {
echo &quot;&lt;label $style&gt;&lt;input type=\&quot;checkbox\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot;/&gt;&lt;/label&gt;&quot;;
}
} else {
if (!empty($attribute[&#039;selected&#039;]) &amp;&amp; $attribute[&#039;selected&#039;] == &#039;true&#039;) {
echo &quot;&lt;input type=\&quot;checkbox\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot; checked=\&quot;checked\&quot;/&gt;&quot;;
} else {
echo &quot;&lt;input type=\&quot;checkbox\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot;/&gt;&quot;;
}
}
break;
case &#039;radio&#039;:
if (!empty($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;])) {
if ($_POST[&quot;{$attribute[&#039;name&#039;]}&quot;] == $attribute[&#039;value&#039;]) {
echo &quot;&lt;input type=\&quot;radio\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot; checked=\&quot;checked\&quot;/&gt;&quot;;
} else {
echo &quot;&lt;input type=\&quot;radio\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot; /&gt;&quot;;
}
} else {
if (!empty($attribute[&#039;selected&#039;]) &amp;&amp; $attribute[&#039;selected&#039;] == &#039;true&#039;) {
echo &quot;&lt;input type=\&quot;radio\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot; checked=\&quot;checked\&quot;/&gt;&quot;;
} else {
echo &quot;&lt;input type=\&quot;radio\&quot; $parameter value=\&quot;{$attribute[&#039;value&#039;]}\&quot;/&gt;&quot;;
}
}
break;
}
}
private function formComplete(): bool
{
$form = $this-&gt;form[&#039;form&#039;];
$fields = $this-&gt;formInterpretation($form);
foreach ($fields as $field) {
switch ($field[&#039;type&#039;]) {
case &#039;captcha&#039;:
if ($this-&gt;captchaInstalled) {
$captcha = @$_POST[&#039;ct_captcha&#039;];
$capId = @$_POST[&#039;captcha_id&#039;];
$securimage = new Securimage();
if (!$securimage-&gt;check($captcha, $capId, true)) {
echo &#039;&lt;div style=&quot;color: red;&quot;&gt;&#039; . mi18n(&quot;Ihr Captcha Code war nicht korrekt. Bitte versuchen Sie es erneut.&quot;) . &#039;&lt;/div&gt;&#039;;
return false;
}
}
break;
default:
if (!$this-&gt;formFieldCorrect($field)) {
return false;
}
}
}
return true;
}
private function success(): void
{
if ($this-&gt;sendEmail()) {
echo $this-&gt;form[&#039;answer&#039;];
} else {
echo &#039;&lt;span style=&quot;color:red;&quot;&gt;&#039; . mi18n(&quot;Es ist ein Fehler aufgetreten!&lt;br&gt;Bitte versuchen Sie es später noch einmal.&quot;) . &#039;&lt;/span&gt;&#039;;
}
}
private function formFieldCorrect(&amp;$field): bool
{
$tmp_name = rtrim($field[&#039;name&#039;], &#039;[0]&#039;);
preg_match(&#039;/\[(\d*)\]/&#039;, $field[&#039;name&#039;], $matches);
$bEmptyPost = false;
$bIsPostArray = false;
$sPostFieldValue = $_POST[$tmp_name];
if (is_array($_POST[$tmp_name])) {
$bIsPostArray == true;
$sPostFieldValue = $_POST[$tmp_name][$matches[1]];
if (empty($_POST[$tmp_name][$matches[1]])) {
$bEmptyPost = true;
}
} elseif (empty($_POST[$tmp_name])) {
$bEmptyPost = true;
}
if (!empty($field[&#039;mandatory&#039;]) &amp;&amp; $field[&#039;mandatory&#039;] == &#039;true&#039; &amp;&amp; $bEmptyPost) {
return false;
}
// wenn das formularfeld kein pflichtfeld und nicht vorhanden ist, true zurückgeben
if ($bEmptyPost) {
return true;
}
// regular expression prüfungen
if (!empty($field[&#039;valid&#039;])) {
switch ($field[&#039;valid&#039;]) {
case &#039;textmitumbruch&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^[\n\r,;:\. ÄÖÜäöüß\-\+\*§$%&amp;\/()=?!\&quot;&#039;\w\d]*$/&quot;]])) {
return false;
}
break;
case &#039;simpletext&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^[\w]*$/i&quot;]])) {
return false;
}
break;
case &#039;text&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^[,;:\. ÄÖÜäöüß\-\+\*§$%&amp;\/()=?!\&quot;&#039;\w\d]*$/&quot;]])) {
return false;
}
break;
case &#039;phone&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^(\(?([\d \-\)\–\+\/\(]+){6,}\)?([ .\-–\/]?)([\d]+))$/&quot;]])) {
return false;
}
break;
case &#039;integer&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^\d*$/&quot;]])) {
return false;
}
break;
case &#039;float&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^[+-]?([0-9]*[.])?[0-9]+$/&quot;]])) {
return false;
}
break;
case &#039;date&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^[0-9]{1,2}.[0-9]{1,2}.[0-9]{2,4}$/&quot;]])) {
return false;
}
break;
case &#039;email&#039;:
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, [&quot;options&quot; =&gt; [&quot;regexp&quot; =&gt; &quot;/^[öäüéàèâêîç_a-z0-9-]+(\.[öäüéàèâêîç_a-z0-9-]+)*@[öäüéàèâêîça-z0-9-]+(\.[öäüéàèâêîça-z0-9-]+)*$/&quot;]])) {
return false;
}
break;
}
}
// grössenbereich bei integer und float prüfen
if (!empty($field[&#039;minvalue&#039;]) &amp;&amp; $sPostFieldValue &lt; $field[&#039;minvalue&#039;])
return false;
if (!empty($field[&#039;maxvalue&#039;]) &amp;&amp; $sPostFieldValue &gt; $field[&#039;maxvalue&#039;])
return false;
// längenbereich bei allen typen prüfen
if (!empty($field[&#039;minlength&#039;]) &amp;&amp; strlen($sPostFieldValue) &lt; $field[&#039;minlength&#039;])
return false;
if (!empty($field[&#039;maxlength&#039;]) &amp;&amp; strlen($sPostFieldValue) &gt; $field[&#039;maxlength&#039;])
return false;
return true;
}
public function process(): void
{
if (!isset($_POST[&#039;sent&#039;])) {
$this-&gt;formOutput();
} elseif ($this-&gt;formComplete()) {
$this-&gt;success();
} else {
$this-&gt;formOutput(true);
}
}
}
if (isset($edit) &amp;&amp; $edit) {
echo &quot;&lt;h1&gt;&quot; . mi18n(&quot;Formularkonfiguration&quot;) . &quot;&lt;/h1&gt;&quot;;
echo &quot;&lt;p&gt;&quot; . mi18n(&quot;Hier ist das Formular sowie der Text einzugeben, der zusammen mit dem Formular ausgegeben werden soll:&quot;) . &quot;&lt;/p&gt;&quot;;
echo &quot;CMS_HTML[0]&quot;;
echo &quot;&lt;p&gt;&quot; . mi18n(&quot;Hier ist die Ausgabe einzugeben, die erscheint, wenn das Formular erfolgreich prozessiert worden ist:&quot;) . &quot;&lt;/p&gt;&quot;;
echo &quot;CMS_HTML[1]&quot;;
} else {
$form = new w3form($captchaInstalled);
$form-&gt;addEmailAdress(&quot;CMS_VALUE[0]&quot;);
$form-&gt;setEmailSubject(&quot;CMS_VALUE[1]&quot;);
$form-&gt;setEmailFrom(&quot;CMS_VALUE[2]&quot;, &quot;CMS_VALUE[3]&quot;);
$form-&gt;setBackgroundError(&quot;CMS_VALUE[4]&quot;);
$form-&gt;setForm(&quot;CMS_HTML[0]&quot;);
$form-&gt;setAnswer(&quot;CMS_HTML[1]&quot;);
$form-&gt;process();
}
?&gt;</output>
</module>
<jsfiles/>
<tplfiles/>
<cssfiles/>
<layouts/>
</modulepackage>