예제 #1
0
파일: init.php 프로젝트: vazahat/dudex
function antibruteforce_core_after_route(OW_Event $event)
{
    if (OW::getUser()->isAuthenticated()) {
        return;
    }
    $classDir = OW::getPluginManager()->getPlugin('antibruteforce')->getClassesDir();
    $handler = OW::getRequestHandler()->getHandlerAttributes();
    if (OW::getConfig()->getValue('antibruteforce', 'authentication')) {
        include_once $classDir . 'sign_in.php';
        include_once $classDir . 'auth_result.php';
    }
    if (OW::getConfig()->getValue('antibruteforce', 'registration')) {
        if ($handler[OW_RequestHandler::ATTRS_KEY_CTRL] == 'BASE_CTRL_Join' && $handler[OW_RequestHandler::ATTRS_KEY_ACTION] == 'index') {
            OW::getEventManager()->bind(OW_EventManager::ON_FINALIZE, 'antibruteforce_core_finalize');
        } else {
            if ($handler[OW_RequestHandler::ATTRS_KEY_CTRL] == 'BASE_CTRL_Captcha' && $handler[OW_RequestHandler::ATTRS_KEY_ACTION] == 'ajaxResponder') {
                include_once $classDir . 'captcha.php';
            }
        }
    }
    if ($handler[OW_RequestHandler::ATTRS_KEY_CTRL] != 'ANTIBRUTEFORCE_CTRL_Antibruteforce') {
        if (ANTIBRUTEFORCE_BOL_Service::getInstance()->isLocked()) {
            ANTIBRUTEFORCE_BOL_Service::getInstance()->redirect();
        }
    }
}
예제 #2
0
파일: service.php 프로젝트: vazahat/dudex
 public static function getInstance()
 {
     if (self::$classInstance === null) {
         self::$classInstance = new self();
     }
     return self::$classInstance;
 }
예제 #3
0
파일: cron.php 프로젝트: vazahat/dudex
 public function deleteBlockIp()
 {
     ANTIBRUTEFORCE_BOL_Service::getInstance()->deleteBlockIp();
 }
예제 #4
0
 public function __construct()
 {
     parent::__construct();
     $this->service = ANTIBRUTEFORCE_BOL_Service::getInstance();
 }