Exemplo n.º 1
0
 public function before($action_name)
 {
     if (!cmsUser::isAdmin()) {
         cmsCore::error404();
     }
     parent::before($action_name);
     $template = cmsTemplate::getInstance();
     $template->setLayout('admin');
     $template->setMenuItems('cp_main', $this->getAdminMenu());
 }
Exemplo n.º 2
0
 public function before($action_name)
 {
     if (!cmsUser::isAdmin()) {
         cmsCore::error404();
     }
     if (!$this->isAllowByIp()) {
         cmsCore::error404();
     }
     parent::before($action_name);
     $this->cms_template->setLayout('admin');
     $this->cms_template->setMenuItems('cp_main', $this->getAdminMenu());
 }
Exemplo n.º 3
0
 /**
  * Все запросы могут быть выполнены только авторизованными и только по аякс
  * @param type $action_name
  */
 public function before($action_name)
 {
     parent::before($action_name);
     if (!$this->request->isInternal()) {
         if (!$this->request->isAjax()) {
             cmsCore::error404();
         }
         if (!cmsUser::isLogged()) {
             cmsCore::error404();
         }
     }
     return true;
 }
Exemplo n.º 4
0
 public function before($action_name)
 {
     parent::before($action_name);
     $core = cmsCore::getInstance();
 }