Beispiel #1
0
 public function init()
 {
     parent::init();
     if (!Yii::app()->request->isAjaxRequest) {
         $this->jsonOutPut(0, Yii::t('default', 'forbiddenaction'));
     }
 }
Beispiel #2
0
 public function init()
 {
     parent::init();
     if (!$this->uid) {
         $this->redirect(array('site/login'));
     }
 }
Beispiel #3
0
 function init()
 {
     parent::init();
     $this->layout = 'user';
     if (!$this->uid) {
         $this->redirect(array('site/login'));
     }
     if ($this->uid == zmf::uid()) {
         $this->mySelf = 'yes';
     }
     $this->pageTitle = $this->userInfo['truename'] . ' - ' . zmf::config('sitename');
     $this->mobileTitle = '个人中心';
     $this->pageDescription = $this->userInfo['truename'] . '的【' . zmf::config('sitename') . '】的个人主页,包括TA的原创文章、精美图片及各类悉心收藏,快来看看吧!';
 }
Beispiel #4
0
 function init()
 {
     parent::init();
     if ($this->isMobile == 'yes') {
         $this->message(0, '感谢你的支持!本页面暂还在拼命制作中...');
     }
     $this->uid = zmf::filterInput($_GET['id']);
     if (!$this->uid) {
         $this->uid = zmf::uid();
     }
     if (!$this->uid) {
         $this->redirect(array('site/login'));
     }
     if ($this->uid == zmf::uid()) {
         $this->mySelf = 'yes';
     }
     $this->userInfo = Users::getUserInfo($this->uid);
     $this->pageTitle = $this->userInfo['username'] . ' - ' . zmf::config('sitename');
     $this->pageDescription = $this->userInfo['username'] . '的【' . zmf::config('sitename') . '】的个人主页,包括TA的原创文章、精美图片及各类悉心收藏,快来看看吧!';
 }
Beispiel #5
0
 public function init()
 {
     parent::init();
 }