move composer vendor folder
Dieser Commit ist enthalten in:
Ursprung
0061ef3bbb
Commit
6525928e83
2 geänderte Dateien mit 109 neuen und 70 gelöschten Zeilen
|
@ -1,38 +1,39 @@
|
||||||
?><?php
|
?><?php
|
||||||
|
cInclude('frontend', 'includes/class.input.helper.php');
|
||||||
|
$oCfgTable = new UI_Config_Table();
|
||||||
|
|
||||||
/**************************************************
|
$oField = new cHTMLTextbox("CMS_VAR[0]", "CMS_VALUE[0]");
|
||||||
* CONTENIDO MODULE - INPUT
|
$oField->setWidth(30);
|
||||||
*
|
$oCfgTable->setCell(0, 0, mi18n("Zieladresse (alias@mydomain.com):"));
|
||||||
* Modulname : w3concepts.form.v1
|
$oCfgTable->setCell(0, 1, $oField->render());
|
||||||
* Author : Andreas Kummer
|
|
||||||
* Copyright : mumprecht & kummer w3concepts
|
$oField = new cHTMLTextbox("CMS_VAR[1]", "CMS_VALUE[1]");
|
||||||
* Created : 20-08-2004
|
$oField->setWidth(30);
|
||||||
* Modified : 20-08-2004
|
$oCfgTable->setCell(1, 0, mi18n("Betreff:"));
|
||||||
* Modified : 24-08-2013, Murat Purc, adapted to newer CONTENIDO (4.8) version
|
$oCfgTable->setCell(1, 1, $oField->render());
|
||||||
*************************************************/
|
|
||||||
|
$oField = new cHTMLTextbox("CMS_VAR[2]", "CMS_VALUE[2]");
|
||||||
|
$oField->setWidth(30);
|
||||||
|
$oCfgTable->setCell(2, 0, mi18n("Antwortadresse (alias@mydomain.com):"));
|
||||||
|
$oCfgTable->setCell(2, 1, $oField->render());
|
||||||
|
|
||||||
|
$oField = new cHTMLTextbox("CMS_VAR[3]", "CMS_VALUE[3]");
|
||||||
|
$oField->setWidth(30);
|
||||||
|
$oCfgTable->setCell(3, 0, mi18n("Emailname (z.B. Vorname Name):"));
|
||||||
|
$oCfgTable->setCell(3, 1, $oField->render());
|
||||||
|
|
||||||
|
$oField = new cHTMLTextbox("CMS_VAR[4]", "CMS_VALUE[4]");
|
||||||
|
$oField->setWidth(8);
|
||||||
|
$oCfgTable->setCell(4, 0, mi18n("Hintergrundfarbe bei Fehlern (z.B. red):"));
|
||||||
|
$oCfgTable->setCell(4, 1, $oField->render());
|
||||||
|
/*
|
||||||
|
$oField = new cHTMLCheckbox("CMS_VAR[5]", "true");
|
||||||
|
$bHasJQuery = ("CMS_VALUE[5]" == 'true')?true:false;
|
||||||
|
$oField->setChecked($bHasJQuery);
|
||||||
|
$oField->setLabelText(' ');
|
||||||
|
$oCfgTable->setCell(5, 0, mi18n("jQuery Script vorhanden:"));
|
||||||
|
$oCfgTable->setCell(5, 1, $oField->render());
|
||||||
|
*/
|
||||||
|
$oCfgTable->render(true);
|
||||||
|
|
||||||
echo "
|
|
||||||
<table cellspacing='0' cellpadding='10' border='0'>
|
|
||||||
<tr>
|
|
||||||
<td>" . mi18n("Zieladresse (alias@mydomain.com):") . "</td>
|
|
||||||
<td><input type='text' name=\"CMS_VAR[0]\" value=\"CMS_VALUE[0]\" size='30' /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>" . mi18n("Betreff:") . "</td>
|
|
||||||
<td><input type='text' name=\"CMS_VAR[1]\" value=\"CMS_VALUE[1]\" size='30' /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>" . mi18n("Antwortadresse (alias@mydomain.com):") . "</td>
|
|
||||||
<td><input type='text' name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\" size='30' /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>" . mi18n("Emailname (z.B. Vorname Name):") . "</td>
|
|
||||||
<td><input type='text' name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\" size='30' /></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>" . mi18n("Hintergrundfarbe bei Fehlern (z.B. red):") . "</td>
|
|
||||||
<td><input type='text' name=\"CMS_VAR[4]\" value=\"CMS_VALUE[4]\" size='30' /></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
";
|
|
||||||
?><?php
|
?><?php
|
|
@ -11,29 +11,32 @@
|
||||||
* Modified : 24-08-2013, Murat Purc, adapted to newer CONTENIDO (4.8) and PHP (5.3/5.4) versions
|
* Modified : 24-08-2013, Murat Purc, adapted to newer CONTENIDO (4.8) and PHP (5.3/5.4) versions
|
||||||
* *********************************************** */
|
* *********************************************** */
|
||||||
|
|
||||||
|
$sFrontEndPath = cRegistry::getClientConfig(cRegistry::getClientId())['path']['frontend'] . 'securimage';
|
||||||
|
require_once $sFrontEndPath . '/securimage.php';
|
||||||
|
require_once $sFrontEndPath . '/CaptchaObject.php';
|
||||||
|
require_once $sFrontEndPath . '/StorageAdapter/AdapterInterface.php';
|
||||||
|
|
||||||
class w3form {
|
class w3form {
|
||||||
|
|
||||||
private $email;
|
private $email = array(
|
||||||
|
'adresses' => '',
|
||||||
|
'from' => array(
|
||||||
|
'name' => '',
|
||||||
|
'email' => ''
|
||||||
|
),
|
||||||
|
'message' => '',
|
||||||
|
'subject' => ''
|
||||||
|
);
|
||||||
private $unraveled = array();
|
private $unraveled = array();
|
||||||
private $form;
|
private $form = array(
|
||||||
|
'form' => '',
|
||||||
|
'answer' => '',
|
||||||
|
'colorError' => ''
|
||||||
|
);
|
||||||
private $formField = array();
|
private $formField = array();
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct()
|
||||||
$this->email = array(
|
{
|
||||||
'adresses' => '',
|
|
||||||
'from' => array(
|
|
||||||
'name' => '',
|
|
||||||
'email' => ''
|
|
||||||
),
|
|
||||||
'message' => '',
|
|
||||||
'subject' => ''
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->form = array(
|
|
||||||
'form' => '',
|
|
||||||
'answer' => '',
|
|
||||||
'colorError' => ''
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function sendEmail() {
|
private function sendEmail() {
|
||||||
|
@ -158,6 +161,8 @@ class w3form {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function formField($attribute, $sent) {
|
public function formField($attribute, $sent) {
|
||||||
|
$style = '';
|
||||||
|
$value = '';
|
||||||
$parameter = "name=\"{$attribute['name']}\"";
|
$parameter = "name=\"{$attribute['name']}\"";
|
||||||
if ($sent && !$this->formFieldCorrect($attribute))
|
if ($sent && !$this->formFieldCorrect($attribute))
|
||||||
$style = "style=\"background-color:{$this->form['colorError']};\"";
|
$style = "style=\"background-color:{$this->form['colorError']};\"";
|
||||||
|
@ -184,6 +189,33 @@ class w3form {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($attribute['type']) {
|
switch ($attribute['type']) {
|
||||||
|
case 'captcha':
|
||||||
|
if ($sent) {
|
||||||
|
$captcha = @$_POST['ct_captcha'];
|
||||||
|
$capId = @$_POST['captcha_id'];
|
||||||
|
$securimage = new Securimage();
|
||||||
|
|
||||||
|
if ($securimage->check($captcha) == false) {
|
||||||
|
echo '<style>'
|
||||||
|
. '#captcha_code {background-color: '.$this->form['colorError'].'}'
|
||||||
|
. '</style>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// show captcha HTML using Securimage::getCaptchaHtml()
|
||||||
|
$options = array();
|
||||||
|
$options['input_name'] = 'ct_captcha'; // change name of input element for form post input_text
|
||||||
|
$options['input_text'] = mi18n("Zeichen eingeben");
|
||||||
|
$options['input_required'] = false;
|
||||||
|
|
||||||
|
if (!empty($_SESSION['ctform']['captcha_error'])) {
|
||||||
|
// error html to show in captcha output
|
||||||
|
$options['error_html'] = $_SESSION['ctform']['captcha_error'];
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "<div id='captcha_container_1'>\n";
|
||||||
|
echo Securimage::getCaptchaHtml($options);
|
||||||
|
echo "\n</div>\n";
|
||||||
|
break;
|
||||||
case 'text':
|
case 'text':
|
||||||
echo "<input type=\"text\" $parameter value=\"$value\" $style />";
|
echo "<input type=\"text\" $parameter value=\"$value\" $style />";
|
||||||
break;
|
break;
|
||||||
|
@ -230,7 +262,7 @@ class w3form {
|
||||||
if ($_POST["{$formId[0]}"]["{$formId[1]}"] == $attribute['value']) {
|
if ($_POST["{$formId[0]}"]["{$formId[1]}"] == $attribute['value']) {
|
||||||
echo "<input type=\"checkbox\" $parameter value=\"{$attribute['value']}\" checked=\"checked\"/>";
|
echo "<input type=\"checkbox\" $parameter value=\"{$attribute['value']}\" checked=\"checked\"/>";
|
||||||
} else {
|
} else {
|
||||||
echo "<input type=\"checkbox\" $parameter value=\"{$attribute['value']}\"/>";
|
echo "<label $style><input type=\"checkbox\" $parameter value=\"{$attribute['value']}\"/></label>";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!empty($attribute['selected']) && $attribute['selected'] == 'true') {
|
if (!empty($attribute['selected']) && $attribute['selected'] == 'true') {
|
||||||
|
@ -261,13 +293,11 @@ class w3form {
|
||||||
private function formComplete() {
|
private function formComplete() {
|
||||||
$form = $this->form['form'];
|
$form = $this->form['form'];
|
||||||
$fields = $this->formInterpretation($form);
|
$fields = $this->formInterpretation($form);
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
if (!$this->formFieldCorrect($field)) {
|
if (!$this->formFieldCorrect($field)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -319,7 +349,7 @@ class w3form {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'text':
|
case 'text':
|
||||||
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, array("options" => array("regexp" => "/^[(\d)? ?\w]*$/")))) {
|
if (!filter_var($sPostFieldValue, FILTER_VALIDATE_REGEXP, array("options" => array("regexp" => "/^[,;:\. ÄÖÜäöüß\-\+\*§$%&\/()=?!\"'\w\d]*$/")))) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -350,19 +380,19 @@ class w3form {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// grössenbereich bei integer und float prüfen
|
|
||||||
if (!empty($field['minvalue']) && $sPostFieldValue < $field['minvalue'])
|
|
||||||
return false;
|
|
||||||
if (!empty($field['maxvalue']) && $sPostFieldValue > $field['maxvalue'])
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// längenbereich bei allen typen prüfen
|
// grössenbereich bei integer und float prüfen
|
||||||
if (!empty($field['minlength']) && strlen($sPostFieldValue) < $field['minlength'])
|
if (!empty($field['minvalue']) && $sPostFieldValue < $field['minvalue'])
|
||||||
return false;
|
return false;
|
||||||
if (!empty($field['maxlength']) && strlen($sPostFieldValue) > $field['maxlength'])
|
if (!empty($field['maxvalue']) && $sPostFieldValue > $field['maxvalue'])
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// längenbereich bei allen typen prüfen
|
||||||
|
if (!empty($field['minlength']) && strlen($sPostFieldValue) < $field['minlength'])
|
||||||
|
return false;
|
||||||
|
if (!empty($field['maxlength']) && strlen($sPostFieldValue) > $field['maxlength'])
|
||||||
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,8 +400,16 @@ class w3form {
|
||||||
if (!isset($_POST['sent'])) {
|
if (!isset($_POST['sent'])) {
|
||||||
$this->formOutput();
|
$this->formOutput();
|
||||||
} elseif ($this->formComplete()) {
|
} elseif ($this->formComplete()) {
|
||||||
$this->success();
|
// check captcha
|
||||||
//$this->formOutput(true);
|
$captcha = @$_POST['ct_captcha'];
|
||||||
|
$capId = @$_POST['captcha_id'];
|
||||||
|
$securimage = new Securimage();
|
||||||
|
if ($securimage->check($captcha, $capId, true) == false) {
|
||||||
|
echo '<div style="color: red;">' . mi18n("Ihr Captcha Code war nicht korrekt. Bitte versuchen Sie es erneut.") . '</div>';
|
||||||
|
$this->formOutput(true);
|
||||||
|
} else {
|
||||||
|
$this->success();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->formOutput(true);
|
$this->formOutput(true);
|
||||||
}
|
}
|
||||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren