Esempio n. 1
0
File: Base.php Progetto: pancke/yyaf
     if ($this->bCheckLogin) {
         // 当前用户
         $aCookie = Util_Cookie::get(Yaf_G::getConf('authkey', 'cookie'));
         if (empty($aCookie)) {
             return $this->redirect('/admin/login');
         }
         $this->aCurrUser = $aCookie;
         // 当前城市
         $this->iCurrCityID = Util_Cookie::get('city');
         if (empty($this->iCurrCityID)) {
             $this->iCurrCityID = $this->aCurrUser['iCityID'];
         }
         $this->aCurrCity = Model_City::getDetail($this->iCurrCityID);
     }
     $this->assign('sStaticRoot', 'http://' . Yaf_G::getConf('static', 'domain'));
 }
 /**
  * 执行Action后的操作
  * 
  * @see Yaf_Controller::actionAfter()
  */
 public function actionAfter()
 {
     if ($this->autoRender() == true) {
         if (!empty($this->aCurrUser)) {
             $this->assign('aCurrUser', $this->aCurrUser);
Esempio n. 2
0
File: Menu.php Progetto: pancke/yyaf
 /**
  * 菜单列表
  */
 public function listAction()
 {
     $aTree = Model_Menu::getTree();
     $this->assign('aTree', $aTree);
     $this->assign('aColor', array('', 'success', 'warning', 'danger', 'info', 'active'));
 }