예제 #1
0
 function captcha()
 {
     $captcha_enabled = RSMembershipHelper::getConfig('captcha_enabled');
     if (!$captcha_enabled) {
         return false;
     }
     ob_end_clean();
     if ($captcha_enabled == 1) {
         if (!class_exists('JSecurImage')) {
             require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_rsmembership' . DS . 'helpers' . DS . 'securimage' . DS . 'securimage.php';
         }
         $captcha = new JSecurImage();
         $captcha_lines = RSMembershipHelper::getConfig('captcha_lines');
         if ($captcha_lines) {
             $captcha->num_lines = 8;
         } else {
             $captcha->num_lines = 0;
         }
         $captcha_characters = RSMembershipHelper::getConfig('captcha_characters');
         $captcha->code_length = $captcha_characters;
         $captcha->image_width = 30 * $captcha_characters + 50;
         $captcha->show();
     }
     die;
 }
예제 #2
0
파일: controller.php 프로젝트: JozefAB/qk
 public function captcha()
 {
     $app = JFactory::getApplication();
     $model = $this->getModel('subscribe');
     if ($model->getUseBuiltin()) {
         // Load Captcha
         if (!class_exists('JSecurImage')) {
             require_once JPATH_ADMINISTRATOR . '/components/com_rsmembership/helpers/securimage/securimage.php';
         }
         ob_end_clean();
         $captcha = new JSecurImage();
         $captcha->num_lines = RSMembershipHelper::getConfig('captcha_lines') ? 8 : 0;
         $captcha->code_length = RSMembershipHelper::getConfig('captcha_characters');
         $captcha->image_width = 30 * $captcha->code_length + 50;
         $captcha->show();
     }
     $app->close();
 }
예제 #3
0
 function captcha()
 {
     $captcha_enabled = RSTicketsProHelper::getConfig('captcha_enabled');
     if (!$captcha_enabled) {
         return false;
     }
     ob_end_clean();
     if ($captcha_enabled == 1) {
         $captcha = new JSecurImage();
         $captcha_lines = RSTicketsProHelper::getConfig('captcha_lines');
         if ($captcha_lines) {
             $captcha->num_lines = 8;
         } else {
             $captcha->num_lines = 0;
         }
         $captcha_characters = RSTicketsProHelper::getConfig('captcha_characters');
         $captcha->code_length = $captcha_characters;
         $captcha->image_width = 30 * $captcha_characters + 50;
         $captcha->show();
     }
     die;
 }