AAAA.htaccess000066600000000177151374445240006364 0ustar00 Order allow,deny Deny from all check_captcha.php000066600000003757151374445240010046 0ustar00 'anti_spam', 'title' => 'Anti SPAM'); var $events = array('success' => 0, 'fail' => 0); var $fail = array('actions' => array('show_HTML')); var $details = array('title' => 'Check Captcha', 'tooltip' => 'Checks the submitted Captcha value.'); function run($form, $actiondata){ $params = new JParameter($actiondata->params); if(isset($_POST['chrono_verification'])){ $mainframe = JFactory::getApplication(); $session = JFactory::getSession(); $sessionvar = $session->get('chrono_verification', '', md5('chrono')); $chrono_verification = strtolower($form->data['chrono_verification']); if(md5($chrono_verification) != $sessionvar){ $this->events['fail'] = 1; $form->validation_errors['chrono_verification'] = $params->get('error', 'You have entered a wrong verification code!'); $form->debug['Core Captcha'][] = "Failed the core captcha check, code entered: ".$form->data['chrono_verification']; $form->data['chrono_verification'] = ''; }else{ $this->events['success'] = 1; $session->clear('chrono_verification', md5('chrono')); $form->debug['Core Captcha'][] = "Passed the core captcha check!"; } }else{ $this->events['fail'] = 1; $form->validation_errors['chrono_verification'] = $params->get('error', 'You have entered a wrong verification code.'); $form->debug['Core Captcha'][] = "Couldn't find the captcha field value in the \$_POST array!"; } } function load($clear){ if($clear){ $action_params = array( 'enabled' => 1, 'error' => 'You have entered a wrong verification code!' ); } return array('action_params' => $action_params); } } ?>check_captcha.ctp000066600000002664151374445240010041 0ustar00
Check Captcha
input('action_check_captcha_{n}_enabled_config', array('type' => 'select', 'label' => 'Enabled', 'options' => array(0 => 'No', 1 => 'Yes'))); ?> input('action_check_captcha_{n}_error_config', array('type' => 'text', 'label' => 'Error Message', 'class' => 'medium_input', 'value' => '')); ?>
index.html000066600000000035151374445240006554 0ustar00