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
|
||||
cInclude('frontend', 'includes/class.input.helper.php');
|
||||
$oCfgTable = new UI_Config_Table();
|
||||
|
||||
/**************************************************
|
||||
* CONTENIDO MODULE - INPUT
|
||||
*
|
||||
* Modulname : w3concepts.form.v1
|
||||
* Author : Andreas Kummer
|
||||
* Copyright : mumprecht & kummer w3concepts
|
||||
* Created : 20-08-2004
|
||||
* Modified : 20-08-2004
|
||||
* Modified : 24-08-2013, Murat Purc, adapted to newer CONTENIDO (4.8) version
|
||||
*************************************************/
|
||||
$oField = new cHTMLTextbox("CMS_VAR[0]", "CMS_VALUE[0]");
|
||||
$oField->setWidth(30);
|
||||
$oCfgTable->setCell(0, 0, mi18n("Zieladresse (alias@mydomain.com):"));
|
||||
$oCfgTable->setCell(0, 1, $oField->render());
|
||||
|
||||
$oField = new cHTMLTextbox("CMS_VAR[1]", "CMS_VALUE[1]");
|
||||
$oField->setWidth(30);
|
||||
$oCfgTable->setCell(1, 0, mi18n("Betreff:"));
|
||||
$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
|
|
@ -11,29 +11,32 @@
|
|||
* 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 {
|
||||
|
||||
private $email;
|
||||
private $email = array(
|
||||
'adresses' => '',
|
||||
'from' => array(
|
||||
'name' => '',
|
||||
'email' => ''
|
||||
),
|
||||
'message' => '',
|
||||
'subject' => ''
|
||||
);
|
||||
private $unraveled = array();
|
||||
private $form;
|
||||
private $form = array(
|
||||
'form' => '',
|
||||
'answer' => '',
|
||||
'colorError' => ''
|
||||
);
|
||||
private $formField = array();
|
||||
|
||||
public function __construct() {
|
||||
$this->email = array(
|
||||
'adresses' => '',
|
||||
'from' => array(
|
||||
'name' => '',
|
||||
'email' => ''
|
||||
),
|
||||
'message' => '',
|
||||
'subject' => ''
|
||||
);
|
||||
|
||||
$this->form = array(
|
||||
'form' => '',
|
||||
'answer' => '',
|
||||
'colorError' => ''
|
||||
);
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
private function sendEmail() {
|
||||
|
@ -158,6 +161,8 @@ class w3form {
|
|||
}
|
||||
|
||||
public function formField($attribute, $sent) {
|
||||
$style = '';
|
||||
$value = '';
|
||||
$parameter = "name=\"{$attribute['name']}\"";
|
||||
if ($sent && !$this->formFieldCorrect($attribute))
|
||||
$style = "style=\"background-color:{$this->form['colorError']};\"";
|
||||
|
@ -184,6 +189,33 @@ class w3form {
|
|||
}
|
||||
|
||||
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':
|
||||
echo "<input type=\"text\" $parameter value=\"$value\" $style />";
|
||||
break;
|
||||
|
@ -230,7 +262,7 @@ class w3form {
|
|||
if ($_POST["{$formId[0]}"]["{$formId[1]}"] == $attribute['value']) {
|
||||
echo "<input type=\"checkbox\" $parameter value=\"{$attribute['value']}\" checked=\"checked\"/>";
|
||||
} else {
|
||||
echo "<input type=\"checkbox\" $parameter value=\"{$attribute['value']}\"/>";
|
||||
echo "<label $style><input type=\"checkbox\" $parameter value=\"{$attribute['value']}\"/></label>";
|
||||
}
|
||||
} else {
|
||||
if (!empty($attribute['selected']) && $attribute['selected'] == 'true') {
|
||||
|
@ -261,13 +293,11 @@ class w3form {
|
|||
private function formComplete() {
|
||||
$form = $this->form['form'];
|
||||
$fields = $this->formInterpretation($form);
|
||||
|
||||
foreach ($fields as $field) {
|
||||
if (!$this->formFieldCorrect($field)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -319,7 +349,7 @@ class w3form {
|
|||
}
|
||||
break;
|
||||
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;
|
||||
}
|
||||
break;
|
||||
|
@ -350,19 +380,19 @@ class w3form {
|
|||
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
|
||||
if (!empty($field['minlength']) && strlen($sPostFieldValue) < $field['minlength'])
|
||||
return false;
|
||||
if (!empty($field['maxlength']) && strlen($sPostFieldValue) > $field['maxlength'])
|
||||
return false;
|
||||
|
||||
// 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
|
||||
if (!empty($field['minlength']) && strlen($sPostFieldValue) < $field['minlength'])
|
||||
return false;
|
||||
if (!empty($field['maxlength']) && strlen($sPostFieldValue) > $field['maxlength'])
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -370,8 +400,16 @@ class w3form {
|
|||
if (!isset($_POST['sent'])) {
|
||||
$this->formOutput();
|
||||
} elseif ($this->formComplete()) {
|
||||
$this->success();
|
||||
//$this->formOutput(true);
|
||||
// check captcha
|
||||
$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 {
|
||||
$this->formOutput(true);
|
||||
}
|
||||
|
|
Laden …
Tabelle hinzufügen
In neuem Issue referenzieren