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()); }
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()); }
/** * Все запросы могут быть выполнены только авторизованными и только по аякс * @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; }
public function before($action_name) { parent::before($action_name); $core = cmsCore::getInstance(); }