Example #1
0
 public function init()
 {
     parent::init();
     if (!issetModule('tariffPlans') || !issetModule('paidservices')) {
         throw404();
     }
 }
Example #2
0
 public function init()
 {
     parent::init();
     $specialOfferPage = Menu::model()->findByPk(Menu::SPECIALOFFERS_ID);
     if ($specialOfferPage) {
         if ($specialOfferPage->active == 0) {
             throw404();
         }
     }
 }
Example #3
0
 public function init()
 {
     parent::init();
     $reviewsPage = Menu::model()->findByPk(Menu::REVIEWS_ID);
     if ($reviewsPage) {
         if ($reviewsPage->active == 0) {
             throw404();
         }
     }
 }
Example #4
0
 public function init()
 {
     parent::init();
     $vacancyPage = Menu::model()->findByPk(Menu::VACANCY_ID);
     if ($vacancyPage) {
         if ($vacancyPage->active == 0) {
             throw404();
         }
     }
 }
Example #5
0
 public function init()
 {
     parent::init();
     $articlePage = Menu::model()->findByPk(Menu::ARTICLES_ID);
     if ($articlePage) {
         if ($articlePage->active == 0) {
             throw404();
         }
     }
 }
Example #6
0
 public function init()
 {
     // если админ - делаем редирект на просмотр в админку
     if (Yii::app()->user->checkAccess('backend_access')) {
         $this->redirect($this->createAbsoluteUrl('/bookingtable/backend/main/admin'));
     }
     /*if (!param('useUserads')) {
     			throw404();
     		}*/
     parent::init();
 }
Example #7
0
 public function init()
 {
     // если админ - делаем редирект на просмотр в админку
     if (Yii::app()->user->checkAccess('apartments_admin')) {
         $this->redirect($this->createAbsoluteUrl('/apartments/backend/main/admin'));
     }
     if (!param('useUserads')) {
         throw404();
     }
     parent::init();
 }
Example #8
0
 public function init()
 {
     $this->app = Yii::app();
     $this->showSearchForm = false;
     $this->defaultLang = Yii::app()->language;
     $this->activeLangs = array($this->defaultLang => $this->defaultLang);
     if (!isFree()) {
         $this->defaultLang = Lang::getDefaultLang();
         $this->activeLangs = Lang::getActiveLangs();
     }
     parent::init();
 }