Пример #1
0
 public function run()
 {
     $userInfo = Wekit::load('user.PwUser')->getUserByUid($this->loginUser->uid, PwUser::FETCH_INFO);
     $userInfo = array_merge($this->loginUser->info, $userInfo);
     list($year, $month, $day) = PwUserHelper::getBirthDay();
     $this->setOutput($this->_buildArea($userInfo['location']), 'location');
     $this->setOutput($this->_buildArea($userInfo['hometown']), 'hometown');
     $isAllowSign = false;
     if ($this->loginUser->getPermission('allow_sign')) {
         $isAllowSign = true;
         $isSignBan = false;
         if (Pw::getstatus($this->loginUser->info['status'], PwUser::STATUS_BAN_SIGN)) {
             Wind::import('SRV:user.srv.PwBanBp');
             $banBp = new PwBanBp($this->loginUser->uid);
             if (false === $banBp->checkIfBanSign()) {
                 $banBp->recoveryBanSignError();
             } elseif ($banBp->endDateTimeBanSign()) {
                 $s = 1 << PwUser::STATUS_BAN_SIGN - 1;
                 $this->loginUser->info['status'] = $this->loginUser->info['status'] - $s;
             } else {
                 $isSignBan = true;
             }
         }
     }
     $extendsSrv = new PwUserProfileExtends($this->loginUser);
     list($_left, $_tab) = $this->getMenuService()->getCurrentTab($this->getInput('_left'), $this->getInput('_tab'));
     $extendsSrv->setCurrent($_left, $_tab);
     $this->runHook('c_profile_foot_run', $extendsSrv);
     $this->setOutput($extendsSrv, 'hookSrc');
     $this->setOutput($isAllowSign, 'isAllowSign');
     $this->setOutput($isSignBan, 'isSignBan');
     $this->setOutput($this->loginUser->getPermission('sign_max_length'), 'signMaxLength');
     $this->setOutput($year, 'years');
     $this->setOutput($month, 'months');
     $this->setOutput($day, 'days');
     $this->setOutput($userInfo, 'userinfo');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $seoBo = PwSeoBo::getInstance();
     $lang = Wind::getComponent('i18n');
     $seoBo->setCustomSeo($lang->getMessage('SEO:profile.index.run.title'), '', '');
     Wekit::setV('seo', $seoBo);
 }
Пример #2
0
 public function run()
 {
     $schoolId = $this->getCurrentSchoolId();
     $userid = $this->loginUser->uid;
     $this->getNoCommentSum($schoolId, $userid);
     $myMenus = $this->_getMyOrderDS()->getMyMenus($schoolId, $userid);
     $this->setOutput($myMenus, 'myMenus');
     $userInfo = Wekit::load('user.PwUser')->getUserByUid($this->loginUser->uid, PwUser::FETCH_INFO);
     $userInfo = array_merge($this->loginUser->info, $userInfo);
     list($year, $month, $day) = PwUserHelper::getBirthDay();
     $this->setOutput($year, 'years');
     $this->setOutput($month, 'months');
     $this->setOutput($day, 'days');
     $this->setOutput($userInfo, 'userinfo');
     $set = $this->getInput("set");
     $this->setOutput($set, "set");
     //set selected menu
     $this->setOutput('编辑个人档案', 'selectedMenu');
     $this->setOutput('个人资料管理', 'subtitle');
     $this->setOutput($schoolId, 'schoolId');
 }