public function beforeAction($action) { parent::beforeAction($action); if (in_array($this->action_id, array('delete', 'disable', 'enable')) && Yii::app()->request->getQuery('id') == Manager::model()->superManagerId()) { $this->showMessage('该账号未超级管理员账号,拒绝该操作'); $this->redirect($this->referer); } return true; }
public function beforeAction($action) { parent::beforeAction($action); $this->setPageTitle('访问统计'); return true; }