Exemplo n.º 1
0
 private function isSystemBlockade($request)
 {
     $canLogWithBlockage = Zend_Auth::getInstance()->getIdentity()->login_with_blockade;
     $blockadeModel = new Blockade();
     $blockade = $blockadeModel->getLast();
     if ($canLogWithBlockage == true || strtolower($request->getControllerName()) === 'nano') {
         return false;
     }
     if ($blockade && $blockade['is_blocked'] == true) {
         return true;
     }
     return false;
 }
Exemplo n.º 2
0
 public function blockadehistoryAction()
 {
     $model = new Blockade();
     $this->view->data = $model->getLast();
     $select = $model->select();
     $request = $this->getRequest();
     $page = $request->getParam('page', 1);
     $sort = $request->getParam('sort', 'created_at');
     $order = $request->getParam('order', 'desc');
     $select->where('ghost = false');
     $select->order($sort . ' ' . $order);
     $paginator = new Base_Paginator(new Zend_Paginator_Adapter_DbTableSelect($select));
     $paginator->setCurrentPageNumber($page);
     $this->view->paginator = $paginator;
     $this->view->headers = array('created_by', 'created_at', 'is_blocked');
 }