Example #1
0
 public function __construct()
 {
     Loader::model('system/captcha/library');
     Loader::model('system/captcha/controller');
     $captcha = SystemCaptchaLibrary::getActive();
     $this->controller = $captcha->getController();
 }
Example #2
0
 public function delete()
 {
     $db = Loader::db();
     if (SystemCaptchaLibrary::getActive()->getSystemCaptchaLibraryHandle() == $this->sclHandle) {
         if ($scl = SystemCaptchaLibrary::getByHandle('securimage')) {
             $scl->activate();
         }
     }
     $db->Execute('delete from SystemCaptchaLibraries where sclHandle = ?', array($this->sclHandle));
 }
 public function view()
 {
     $list = SystemCaptchaLibrary::getList();
     $captchas = array();
     foreach ($list as $sc) {
         $captchas[$sc->getSystemCaptchaLibraryHandle()] = $sc->getSystemCaptchaLibraryName();
     }
     $scl = SystemCaptchaLibrary::getActive();
     $this->set('activeCaptcha', $scl);
     $this->set('captchas', $captchas);
 }