示例#1
0
 public function taAction()
 {
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:like.mylike.ta.title'), '', '');
 }
示例#2
0
 public function run()
 {
     list($type, $page) = $this->getInput(array('type', 'page'));
     $page = intval($page);
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $noticeList = $this->_getNoticeDs()->getNotices($this->loginUser->uid, $type, $start, $limit);
     $noticeList = $this->_getNoticeService()->formatNoticeList($noticeList);
     $typeCounts = $this->_getNoticeService()->countNoticesByType($this->loginUser->uid);
     //类型
     $typeid = intval($type);
     //获取未读通知数
     $unreadCount = $this->_getNoticeDs()->getUnreadNoticeCount($this->loginUser->uid);
     $this->_readNoticeList($unreadCount, $noticeList);
     //count
     $count = intval($typeCounts[$typeid]['count']);
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput(ceil($count / $perpage), 'totalpage');
     $this->setOutput(array('type' => $typeid), 'args');
     $this->setOutput($typeid, 'typeid');
     $this->setOutput($typeCounts, 'typeCounts');
     $this->setOutput($noticeList, 'noticeList');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:mess.notice.run.title'), '', '');
 }
示例#3
0
 /** 
  * 电子邮件用户激活
  */
 public function emailAction()
 {
     list($page, $perpage) = $this->getInput(array('page', 'perpage'));
     $page = $page ? $page : 1;
     $perpage = $perpage ? $perpage : $this->perpage;
     $count = $this->_getDs()->countUnActived();
     $list = array();
     if ($count > 0) {
         $totalPage = ceil($count / $perpage);
         $page > $totalPage && ($page = $totalPage);
         $result = $this->_getDs()->getUnActivedList($perpage, intval(($page - 1) * $perpage));
         /* @var $userDs PwUser */
         $userDs = Wekit::load('user.PwUser');
         $list = $userDs->fetchUserByUid(array_keys($result), PwUser::FETCH_MAIN);
         $list = WindUtility::mergeArray($result, $list);
     }
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput(array('perpage' => $perpage), 'args');
     $this->setOutput($list, 'list');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:manage.user.email.title'), '', '');
 }
示例#4
0
 public function run()
 {
     $page = $this->getInput('page');
     $this->page = $page < 1 ? 1 : intval($page);
     list($start, $limit) = Pw::page2limit($this->page, $this->perpage);
     $timestamp = PW::getTime();
     $startTime = $timestamp - 7 * 86400;
     $endTime = $timestamp;
     $total = $this->_getPollDs()->countPollByTime($startTime, $endTime);
     $pollInfo = array();
     if ($total) {
         Wind::import('SRV:poll.srv.dataSource.PwFetchPollByTime');
         $pollDisplay = new PwPollDisplay(new PwFetchPollByTime($startTime, $endTime, $limit, $start, array('voter_num' => 0, 'created_time' => 0)));
         $pollInfo = $this->_buildPoll($pollDisplay->gather());
     }
     $latestPollDisplay = new PwPollDisplay(new PwFetchPollByOrder(10, 0, array('created_time' => '0')));
     $latestPoll = $latestPollDisplay->gather();
     $this->setOutput($total, 'total');
     $this->setOutput($pollInfo, 'pollInfo');
     $this->setOutput($latestPoll, 'latestPoll');
     $this->setOutput($this->page, 'page');
     $this->setOutput($this->perpage, 'perpage');
     $this->setOutput(array('allowview' => $this->loginUser->getPermission('allow_view_vote'), 'allowvote' => $this->loginUser->getPermission('allow_participate_vote')), 'pollGroup');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     if ($this->page > 1) {
         PwSeoBo::setCustomSeo($lang->getMessage('SEO:vote.hot.run.page.title', array($this->page)), $lang->getMessage('vote.hot.run.description'), '');
     } else {
         PwSeoBo::setCustomSeo($lang->getMessage('SEO:vote.hot.run.title'), '', $lang->getMessage('SEO:vote.hot.run.description'));
     }
 }
示例#5
0
 /**
  * 谁看过我
  */
 public function run()
 {
     $space = $this->_getSpaceDs()->getSpace($this->loginUser->uid);
     $visitors = $space['visitors'] ? unserialize($space['visitors']) : array();
     $uids = array_keys($visitors);
     if ($uids) {
         $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_MAIN | PwUser::FETCH_DATA | PwUser::FETCH_INFO);
         $userList = $this->_buildData($userList, $uids);
         $follows = $this->_getAttentionDs()->fetchFollows($this->loginUser->uid, $uids);
         $fans = $this->_getAttentionDs()->fetchFans($this->loginUser->uid, $uids);
         $friends = array_intersect_key($fans, $follows);
         $this->setOutput($fans, 'fans');
         $this->setOutput($friends, 'friends');
         $this->setOutput($userList, 'userList');
         $this->setOutput($follows, 'follows');
     } else {
         Wind::import('SRV:user.vo.PwUserSo');
         $vo = new PwUserSo();
         $vo->orderbyLastpost(false);
         $lastPostUser = Wekit::load('SRV:user.PwUserSearch')->searchUser($vo, 2);
         if ($lastPostUser) {
             unset($lastPostUser[$this->loginUser->uid]);
             $lastPostUser = array_keys($lastPostUser);
             $this->setOutput($lastPostUser[0], 'lastPostUser');
         }
     }
     $this->setOutput($visitors, 'visitors');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.visitor.run.title'), '', '');
 }
示例#6
0
 public function run()
 {
     $page = $this->getInput('page');
     $this->page = $page < 1 ? 1 : intval($page);
     list($start, $limit) = Pw::page2limit($this->page, $this->perpage);
     $total = $this->_getPollVoterDs()->countByUid(Wekit::getLoginUser()->uid);
     $poll = $total ? $this->_getPollVoterDs()->getPollByUid(Wekit::getLoginUser()->uid, $limit, $start) : array();
     $pollInfo = array();
     if ($poll) {
         $pollid = array();
         foreach ($poll as $value) {
             $pollid[] = $value['poll_id'];
         }
         Wind::import('SRV:poll.srv.dataSource.PwFetchPollByPollid');
         $pollDisplay = new PwPollDisplay(new PwFetchPollByPollid($pollid, count($pollid)));
         $pollInfo = $this->_buildPoll($pollDisplay->gather(), 'my');
     }
     $latestPollDisplay = new PwPollDisplay(new PwFetchPollByOrder(10, 0, array('created_time' => '0')));
     $latestPoll = $latestPollDisplay->gather();
     $this->setOutput($total, 'total');
     $this->setOutput($pollInfo, 'pollInfo');
     $this->setOutput($latestPoll, 'latestPoll');
     $this->setOutput($this->page, 'page');
     $this->setOutput($this->perpage, 'perpage');
     $this->setOutput(array('allowview' => $this->loginUser->getPermission('allow_view_vote'), 'allowvote' => $this->loginUser->getPermission('allow_participate_vote')), 'pollGroup');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:vote.my.run.title'), '', '');
 }
示例#7
0
 public function run()
 {
     $this->setCurrentLeft('avatar');
     $isAvatarBan = false;
     if (Pw::getstatus($this->loginUser->info['status'], PwUser::STATUS_BAN_AVATAR)) {
         Wind::import('SRV:user.srv.PwBanBp');
         $banBp = new PwBanBp($this->loginUser->uid);
         if (false === $banBp->checkIfBanAvatar()) {
             $banBp->recoveryBanAvatarError();
         } elseif ($banBp->endDateTimeBanAvatar()) {
             $this->loginUser->info['status'] = $banBp->callEndDateTimeBanAvatar();
         } else {
             $isAvatarBan = true;
             $info = $banBp->getBanAvatarInfo();
             if ($info['created_userid'] == 0) {
                 $info['operator'] = 'system';
             } else {
                 $operatorInfo = Wekit::load('user.PwUser')->getUserByUid($info['created_userid']);
                 $info['operator'] = $operatorInfo['username'];
             }
             $this->setOutput($info, 'banInfo');
         }
     }
     $windidApi = $this->_getWindid();
     $this->setOutput($windidApi->showFlash($this->loginUser->uid), 'avatarFlash');
     $this->setOutput($windidApi->showFlash($this->loginUser->uid, 0), 'avatarArr');
     $this->setOutput($isAvatarBan, 'isAvatarBan');
     $this->setOutput($this->getInput('type'), 'type');
     $this->setLayout('');
     $this->setTemplate('profile_avatar');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:profile.avatar.run.title'), '', '');
 }
示例#8
0
 /**
  * 回复列表
  */
 public function replyAction()
 {
     list($page, $perpage) = $this->getInput(array('page', 'perpage'));
     $page = $page ? $page : 1;
     $perpage = $perpage ? $perpage : $this->perpage;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $count = $this->_getThreadExpandDs()->countDisabledPostByUid($this->loginUser->uid);
     if ($count) {
         $tmpPosts = $this->_getThreadExpandDs()->getDisabledPostByUid($this->loginUser->uid, $limit, $start);
         $posts = $tids = array();
         foreach ($tmpPosts as $v) {
             $tids[] = $v['tid'];
         }
         $threads = $this->_getThreadDs()->fetchThread($tids);
         foreach ($tmpPosts as $v) {
             $v['threadSubject'] = Pw::substrs($threads[$v['tid']]['subject'], 30);
             $v['content'] = Pw::substrs($v['content'], 30);
             $v['created_time'] = PW::time2str($v['created_time'], 'auto');
             $posts[] = $v;
         }
     }
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($posts, 'posts');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.article.reply.title'), '', '');
 }
示例#9
0
 public function run()
 {
     $permissionService = new PwPermissionService();
     $categorys = $permissionService->getPermissionPoint($this->_getShowPoint(), array('basic', 'bbs'));
     $compare = $this->getInput('gid');
     if ($compare && $compare != $this->loginUser->gid) {
         $this->setOutput(true, 'compare');
         $compareGroup = $permissionService->getPermissionConfigByGid($compare, $this->_getShowPoint());
         $this->setOutput($compareGroup, 'compareGroupPermission');
         $this->setOutput($compare, 'comparegid');
     }
     $myGroup = $permissionService->getPermissionConfigByGid($this->loginUser->gid, $this->_getShowPoint());
     $this->listGroups();
     $attach = array('allow_upload', 'allow_download', 'uploads_perday');
     foreach ($categorys['bbs']['sub'] as $_k => $_v) {
         if (!in_array($_v, $attach)) {
             continue;
         }
         unset($categorys['bbs']['sub'][$_k]);
     }
     $totalCredit = Wekit::load('usergroup.srv.PwUserGroupsService')->getCredit($this->loginUser->info);
     $categorys['attach'] = array('name' => '附件权限', 'sub' => $attach);
     $this->setOutput($categorys, 'categorys');
     $this->setOutput($myGroup, 'myGroupPermission');
     $this->setOutput($totalCredit, 'myCredit');
     $this->_appendBread('权限查看', WindUrlHelper::createUrl('profile/right/run'));
     $this->setTemplate('profile_right');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:profile.right.run.title'), '', '');
 }
示例#10
0
 /**
  * 关注-首页
  */
 public function run()
 {
     $type = $this->getInput('type');
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $url = $classCurrent = array();
     $typeCounts = $this->_getTypeDs()->countUserType($this->loginUser->uid);
     if ($type) {
         $tmp = $this->_getTypeDs()->getUserByType($this->loginUser->uid, $type, $limit, $start);
         $follows = $this->_getDs()->fetchFollows($this->loginUser->uid, array_keys($tmp));
         $count = $typeCounts[$type] ? $typeCounts[$type]['count'] : 0;
         $url['type'] = $type;
         $classCurrent[$type] = 'current';
     } else {
         $follows = $this->_getDs()->getFollows($this->loginUser->uid, $limit, $start);
         $count = $this->loginUser->info['follows'];
         $classCurrent[0] = 'current';
     }
     $uids = array_keys($follows);
     $fans = $this->_getDs()->fetchFans($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_MAIN | PwUser::FETCH_DATA | PwUser::FETCH_INFO);
     $service = $this->_getService();
     $typeArr = $service->getAllType($this->loginUser->uid);
     $userType = $service->getUserType($this->loginUser->uid, $uids);
     foreach ($userType as $key => $value) {
         $tmp = array();
         foreach ($value as $k => $v) {
             $tmp[$v] = $typeArr[$v];
         }
         ksort($tmp);
         $userType[$key] = $tmp;
     }
     $follows = WindUtility::mergeArray($follows, $userList);
     if (!$type && !$follows) {
         $num = 30;
         $uids = $this->_getRecommendService()->getRecommendAttention($this->loginUser->uid, $num);
         $uids = array_slice($uids, 0, 24);
         $this->setOutput($this->_getRecommendService()->buildUserInfo($this->loginUser->uid, $uids, $num), 'recommend');
     }
     $this->setOutput($follows, 'follows');
     $this->setOutput($typeArr, 'typeArr');
     $this->setOutput($type, 'type');
     $this->setOutput($userType, 'userType');
     $this->setOutput($typeCounts, 'typeCounts');
     $this->setOutput($fans, 'fans');
     $this->setOutput($classCurrent, 'classCurrent');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.follow.run.title'), '', '');
 }
示例#11
0
 /** 
  * 推荐关注
  */
 public function run()
 {
     $uids = $this->getOnlneUids(40);
     $userList = $this->_buildUserInfo($this->loginUser->uid, $uids, 20);
     $this->setOutput($userList, 'userList');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.friend.run.title'), '', '');
 }
示例#12
0
 public function run()
 {
     $this->init();
     $this->setOutput($this->getInput('invite'), 'invite');
     $this->setOutput(WindUrlHelper::createUrl('bbs/index/run'), 'backurl');
     $this->setTemplate('register');
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:u.register.run.title'), '', '');
 }
示例#13
0
 public function run()
 {
     $this->setOutput($this->_showVerify(), 'verify');
     $this->setOutput('用户登录', 'title');
     $this->setOutput($this->_filterUrl(false), 'url');
     $this->setOutput(PwUserHelper::getLoginMessage(), 'loginWay');
     $this->setOutput($this->getInput('invite'), 'invite');
     $this->setTemplate('login');
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:u.login.run.title'), '', '');
 }
示例#14
0
 public function run()
 {
     $resource = Wind::getComponent('i18n');
     list($_pwdMsg, $_pwdArgs) = PwUserValidator::buildPwdShowMsg();
     $this->setOutput($resource->getMessage($_pwdMsg, $_pwdArgs), 'pwdReg');
     $this->setCurrentLeft('password');
     $this->appendBread('修改密码', WindUrlHelper::createUrl('profile/password/run'));
     $this->setTemplate('profile_password');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:profile.password.run.title'), '', '');
 }
示例#15
0
 /**
  * 用户资料
  */
 public function run()
 {
     $lang = Wind::getComponent('i18n');
     $gid = $this->space->spaceUser['groupid'] == 0 ? $this->space->spaceUser['memberid'] : $this->space->spaceUser['groupid'];
     $group = Wekit::load('usergroup.PwUserGroups')->getGroupByGid($gid);
     $constellation = Wekit::load('space.srv.PwSpaceService')->getConstellation($this->space->spaceUser['byear'], $this->space->spaceUser['bmonth'], $this->space->spaceUser['bday']);
     $this->setOutput($group['name'], 'groupName');
     $this->setOutput($lang->getMessage('USER:profile.constellation.' . $constellation), 'constellation');
     $this->setOutput('profile', 'src');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:space.profile.run.title', array($this->space->spaceUser['username'], $this->space->space['space_name'])), '', $lang->getMessage('SEO:space.profile.run.description', array($this->space->spaceUser['username'])));
 }
示例#16
0
 /**
  * 关注-首页
  */
 public function run()
 {
     $type = $this->getInput('type');
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $args = $classCurrent = array();
     /*		$typeCounts = $this->_getTypeDs()->countUserType($this->space->spaceUid);
     		if ($type) {
     			$tmp = $this->_getTypeDs()->getUserByType($this->space->spaceUid, $type, $limit, $start);
     			$follows = $this->_getDs()->fetchFollows($this->space->spaceUid, array_keys($tmp));
     			$count = $typeCounts[$type] ? $typeCounts[$type]['count'] : 0;
     			$classCurrent[$type] = 'current';
     			$args = array('type' => $type);
     		} else {*/
     $follows = $this->_getDs()->getFollows($this->space->spaceUid, $limit, $start);
     $count = $this->space->spaceUser['follows'];
     $classCurrent[0] = 'current';
     //}
     $uids = array_keys($follows);
     $fans = $this->_getDs()->fetchFans($this->loginUser->uid, $uids);
     $myfollows = $this->_getDs()->fetchFollows($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_ALL);
     $service = $this->_getService();
     $args['uid'] = $this->space->spaceUid;
     $follows = WindUtility::mergeArray($follows, $userList);
     if (!$follows && $this->space->tome == PwSpaceBo::MYSELF) {
         $num = 20;
         $uids = $this->_getRecommendService()->getRecommendAttention($this->loginUser->uid, $num);
         $this->setOutput($this->_getRecommendService()->buildUserInfo($this->loginUser->uid, $uids, $num), 'recommend');
     }
     $this->setOutput($fans, 'fans');
     $this->setOutput($follows, 'follows');
     $this->setOutput($myfollows, 'myfollows');
     $this->setOutput($classCurrent, 'classCurrent');
     $this->setOutput($args, 'args');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput('follows', 'src');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:space.follows.run.title', array($this->space->spaceUser['username'], $this->space->space['space_name'])), '', $lang->getMessage('SEO:space.follows.run.description', array($this->space->spaceUser['username'])));
 }
示例#17
0
 /**
  * (non-PHPdoc)
  * @see wekit/wind/web/WindController::run()
  */
 public function run()
 {
     $page = (int) $this->getInput('page', 'get');
     if ($page < 1) {
         $page = 1;
     }
     $this->setOutput('index', 'src');
     $this->setOutput($page, 'page');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     $des = Pw::substrs($this->space->space['space_descrip'], 100, 0, false);
     if ($page == 1) {
         PwSeoBo::setCustomSeo($lang->getMessage('SEO:space.index.run.title', array($this->space->space['space_name'])), '', $des);
     } else {
         PwSeoBo::setCustomSeo($lang->getMessage('SEO:space.index.run.page.title', array($page, $this->space->space['space_name'])), '', $des);
     }
 }
示例#18
0
 public function run()
 {
     $this->setCurrentLeft();
     $model = $this->getProfileMenu();
     unset($model['profile'], $model['contact'], $model['tag']);
     $userInfo = Wekit::load('user.PwUser')->getUserByUid($this->loginUser->uid, PwUser::FETCH_INFO);
     $secret = $userInfo['secret'] ? unserialize($userInfo['secret']) : array();
     //手机号码默认仅自己可见
     !isset($secret['mobile']) && ($secret['mobile'] = 1);
     $this->setOutput($model, 'model');
     $this->setOutput($secret, 'secret');
     $this->setOutput($this->getSecretOption(), 'option');
     $this->appendBread('空间隐私', WindUrlHelper::createUrl('profile/secret/run'));
     $this->setTemplate('profile_secret');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:profile.secret.run.title'), '', '');
 }
示例#19
0
 /**
  * 错误提示
  *
  * @see WindErrorHandler::run()
  */
 public function run()
 {
     $this->setOutput($this->state, 'state');
     if (isset($this->error['data'])) {
         $this->setOutput($this->error['data'], 'data');
         unset($this->error['data']);
     }
     $this->setOutput($this->error, "message");
     $this->setTemplate('TPL:common.error');
     // set layout for common request
     if (!$this->getRequest()->getIsAjaxRequest()) {
         $this->setLayout('TPL:common.layout_error');
         Wind::import('SRV:seo.bo.PwSeoBo');
         $lang = Wind::getComponent('i18n');
         PwSeoBo::setCustomSeo($lang->getMessage('SEO:' . $this->state . '.page.title'), '', '');
         PwSeoBo::set('{sitename}', Wekit::C('site', 'info.name'));
         Wekit::setGlobal(NEXT_VERSION, 'version');
         Wekit::setGlobal(PwSeoBo::getData(), 'seo');
     }
 }
示例#20
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');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:profile.index.run.title'), '', '');
 }
示例#21
0
 public function run()
 {
     $fid = $this->getInput('fid');
     $type = intval($this->getInput('type', 'get'));
     // 主题分类ID
     $page = intval($this->getInput('page', 'get'));
     $page < 1 && ($page = 1);
     $perpage = Wekit::C('bbs', 'thread.perpage');
     $pwforum = new PwForumBo($fid, true);
     if (!$pwforum->isForum(true)) {
         $this->showError('BBS:forum.exists.not');
     }
     if (($result = $pwforum->allowVisit($this->loginUser)) !== true) {
         $this->showError($result->getError());
     }
     $totalJoin = Wekit::load('forum.PwForumUser')->countUserByFid($fid);
     $joinUser = Wekit::load('forum.PwForumUser')->getUserByFid($fid, 15);
     $activeUser = Wekit::load('forum.srv.PwForumUserService')->getActiveUser($fid, 7, 50);
     $uids = array_merge(array_keys($joinUser), array_keys($activeUser));
     $users = Wekit::load('user.PwUser')->fetchUserByUid($uids);
     $guide = $pwforum->headguide();
     $guide .= $this->buildBread('会员', 'bbs/user/run?fid=' . $fid);
     $this->setOutput($fid, 'fid');
     $this->setOutput($pwforum, 'pwforum');
     $this->setOutput($guide, 'headguide');
     $this->setOutput($totalJoin, 'totalJoin');
     $this->setOutput($joinUser, 'joinUser');
     $this->setOutput($activeUser, 'activeUser');
     $this->setOutput($users, 'users');
     //版块风格
     //版块风格
     if ($pwforum->foruminfo['style']) {
         $this->setTheme('forum', $pwforum->foruminfo['style']);
         //$this->addCompileDir($pwforum->foruminfo['style']);
     }
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.user.run.title', array($pwforum->foruminfo['name'])), '', $lang->getMessage('SEO:bbs.user.run.description', array($pwforum->foruminfo['name'])));
 }
示例#22
0
 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $count = $this->loginUser->info['fans'];
     $fans = $this->_getDs()->getFans($this->loginUser->uid, $limit, $start);
     $uids = array_keys($fans);
     $follows = $this->_getDs()->fetchFollows($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_MAIN | PwUser::FETCH_DATA | PwUser::FETCH_INFO);
     $this->setOutput(WindUtility::mergeArray($fans, $userList), 'fans');
     $this->setOutput($follows, 'follows');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     //$this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.fans.run.title'), '', '');
 }
示例#23
0
 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     list($start, $num) = Pw::page2limit($page, $this->perpage);
     $orderBy = $this->getInput('orderby', 'get');
     if (!$orderBy || !isset($this->orderBy[$orderBy])) {
         $orderBy = key($this->orderBy);
     }
     $count = $this->_appDs()->countByStatus(1);
     $apps = $this->_appDs()->fetchListByStatus($num, $start, 9, $this->orderBy[$orderBy]);
     $return = array();
     foreach ($apps as $k => $v) {
         $return[] = array('app_id' => $k, 'name' => $v['name'], 'logo' => $v['logo'], 'alias' => $v['alias'], 'desc' => $v['description'] ? $v['description'] : '这家伙很懒', 'url' => $v['status'] & 8 ? WindUrlHelper::createUrl('appcenter/apps/run', array('appid' => $v['app_id'])) : WindUrlHelper::createUrl('app/index/run', array('app' => $v['alias'])));
     }
     $this->setOutput(array('apps' => $return, 'count' => $count, 'perpage' => $this->perpage, 'page' => $page, 'orderby' => $orderBy));
     $this->setTemplate('app_index_run');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:appcenter.appindex.run.title'), '', '');
 }
示例#24
0
 /**
  * 举报管理
  *
  * @return void
  */
 public function run()
 {
     list($page, $perpage, $ifcheck, $type) = $this->getInput(array('page', 'perpage', 'ifcheck', 'type'));
     $page = $page ? $page : 1;
     $perpage = $perpage ? $perpage : $this->perpage;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $count = $this->_getReportDs()->countByType($ifcheck, $type);
     if ($count) {
         $reports = $this->_getReportService()->getReceiverList($ifcheck, $type, $limit, $start);
     }
     $reportTypes = $this->_getReportService()->getTypeName();
     $this->setOutput($reportTypes, 'reportTypes');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($reports, 'reports');
     $this->setOutput(array('ifcheck' => $ifcheck, 'type' => $type), 'args');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:manage.report.run.title'), '', '');
 }
示例#25
0
 public function run()
 {
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     $fans = $this->_getDs()->getFans($this->space->spaceUid, $limit, $start);
     $uids = array_keys($fans);
     $count = $this->space->spaceUser['fans'];
     $follows = $this->_getDs()->fetchFollows($this->loginUser->uid, $uids);
     $userList = Wekit::load('user.PwUser')->fetchUserByUid($uids, PwUser::FETCH_ALL);
     $this->setOutput(WindUtility::mergeArray($fans, $userList), 'fans');
     $this->setOutput($follows, 'follows');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput('fans', 'src');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:space.fans.run.title', array($this->space->spaceUser['username'], $this->space->space['space_name'])), '', $lang->getMessage('SEO:space.fans.run.description', array($this->space->spaceUser['username'])));
 }
示例#26
0
 public function orderAction()
 {
     $info = $this->_getMedalUserDs()->getMedalUser($this->loginUser->uid);
     $attentionDs = Wekit::load('SRV:attention.PwAttention');
     $toUids = $attentionDs->getFollows($this->loginUser->uid, 100);
     //100个关注的人中取
     $toUids = array_keys($toUids);
     $toUids[] = $this->loginUser->uid;
     $attentionMedals = $toUids ? $this->_getMedalUserDs()->fetchMedalUserOrder($toUids, 0, 10) : array();
     $attentionUids = array();
     foreach ($attentionMedals as $v) {
         $v['counts'] > 0 && ($attentionUids[] = $v['uid']);
     }
     $info['sort'] = 0;
     if (in_array($this->loginUser->uid, $attentionUids)) {
         foreach ($attentionUids as $attention) {
             $info['sort']++;
             if ($this->loginUser->uid == $attention) {
                 break;
             }
         }
     }
     $totalMedals = $this->_getMedalUserDs()->getTotalOrder(10);
     $totalUids = array_keys($totalMedals);
     $totalOrder = array_search($this->loginUser->uid, $totalUids);
     $totalOrder = $totalOrder === false ? false : $totalOrder + 1;
     $uids = array_merge($attentionUids, $totalUids);
     $userInfos = $uids ? Wekit::load('SRV:user.PwUser')->fetchUserByUid($uids) : array();
     $this->setOutput($attentionMedals, 'attentionMedals');
     $this->setOutput($totalMedals, 'totalMedals');
     $this->setOutput($userInfos, 'userInfos');
     $this->setOutput($totalOrder, 'totalOrder');
     $this->setOutput($info, 'info');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:medal.index.order.title'), '', '');
 }
示例#27
0
 /**
  * 邀请链接
  */
 public function inviteFriendAction()
 {
     if ($this->regist['type'] == 2) {
         $this->forwardAction('my/invite/run');
     }
     /* @var $pwInviteUrlLogSrv PwInviteFriendService */
     $pwInviteUrlLogSrv = Wekit::load('invite.srv.PwInviteFriendService');
     $invite = $pwInviteUrlLogSrv->createInviteCode($this->loginUser->uid);
     $this->setOutput(WindUrlHelper::createUrl('u/register/run', array('invite' => $invite)), 'url');
     $this->setTemplate('invite_friend');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.invite.run.title'), '', '');
 }
示例#28
0
 /**
  * 我的版块
  */
 public function myAction()
 {
     if (!$this->loginUser->isExists()) {
         $this->forwardAction('u/login/run', array('backurl' => WindUrlHelper::createUrl('bbs/forum/my')));
     }
     $order = $this->getInput('order', 'get');
     $page = intval($this->getInput('page', 'get'));
     $threadList = new PwThreadList();
     // $this->runHook('c_thread_run', $forumDisplay);
     $threadList->setPage($page)->setPerpage(Wekit::C('bbs', 'thread.perpage'));
     Wind::import('SRV:forum.srv.threadList.PwMyForumThread');
     $dataSource = new PwMyForumThread($this->loginUser);
     if ($order == 'postdate') {
         $dataSource->setOrderBy($order);
     } else {
         $dataSource->setOrderBy('lastpost');
     }
     $threadList->execute($dataSource);
     $threaddb = $threadList->getList();
     $fids = array();
     foreach ($threaddb as $key => $value) {
         $fids[] = $value['fid'];
     }
     $forums = Wekit::load('forum.PwForum')->fetchForum($fids);
     $this->setOutput($threaddb, 'threadList');
     $this->setOutput($forums, 'forums');
     $this->setOutput($threadList->icon, 'icon');
     $this->setOutput($threadList->uploadIcon, 'uploadIcon');
     $this->setOutput($order, 'order');
     $this->setOutput($threadList->page, 'page');
     $this->setOutput($threadList->perpage, 'perpage');
     $this->setOutput($threadList->total, 'count');
     $this->setOutput($threadList->maxPage, 'totalpage');
     $this->setOutput($threadList->getUrlArgs(), 'urlargs');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:bbs.forum.my.title'), '', '');
 }
示例#29
0
 public function replyAction()
 {
     $page = intval($this->getInput('page'));
     list($author, $fid, $createdTimeStart, $createdTimeEnd) = $this->getInput(array('author', 'fid', 'created_time_start', 'created_time_end'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:forum.vo.PwPostSo');
     $so = new PwPostSo();
     $so->setDisabled(1)->orderbyCreatedTime(0);
     $url = array();
     if ($author) {
         $so->setAuthor($author);
         $url['author'] = $author;
     }
     if ($fid) {
         $so->setFid($fid);
         $url['fid'] = $fid;
     }
     if ($createdTimeStart) {
         $so->setCreateTimeStart(Pw::str2time($createdTimeStart));
         $url['created_time_start'] = $createdTimeStart;
     }
     if ($createdTimeEnd) {
         $so->setCreateTimeEnd(Pw::str2time($createdTimeEnd));
         $url['created_time_end'] = $createdTimeEnd;
     }
     $count = Wekit::load('forum.PwThread')->countSearchPost($so);
     $postdb = Wekit::load('forum.PwThread')->searchPost($so, $limit, $start);
     $this->setOutput($postdb, 'postdb');
     $this->setOutput(Wekit::load('forum.srv.PwForumService')->getForumOption($fid), 'option_html');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:manage.content.reply.title'), '', '');
 }
示例#30
0
 /**
  * 回收站-回复
  */
 public function replyAction()
 {
     $threaddb = $params = array();
     list($keyword, $fid, $author, $createdTimeStart, $createdTimeEnd, $operator, $operateTimeStart, $operateTimeEnd) = $this->getInput(array('keyword', 'fid', 'author', 'created_time_start', 'created_time_end', 'operator', 'operate_time_start', 'operate_time_end'));
     $page = intval($this->getInput('page'));
     $page < 1 && ($page = 1);
     $perpage = 20;
     list($start, $limit) = Pw::page2limit($page, $perpage);
     Wind::import('SRV:recycle.vo.PwRecycleReplySo');
     $so = new PwRecycleReplySo();
     $so->orderbyCreatedTime(0);
     $url = array();
     if ($keyword) {
         $so->setKeywordOfTitle($keyword);
         $url['keyword'] = $keyword;
     }
     if ($author) {
         $so->setAuthor($author);
         $url['author'] = $author;
     }
     if ($fid) {
         $so->setFid($fid);
         $url['fid'] = $fid;
     }
     if ($createdTimeStart) {
         $so->setCreateTimeStart(Pw::str2time($createdTimeStart));
         $url['created_time_start'] = $createdTimeStart;
     }
     if ($createdTimeEnd) {
         $so->setCreateTimeEnd(Pw::str2time($createdTimeEnd));
         $url['created_time_end'] = $createdTimeEnd;
     }
     if ($operator) {
         $so->setOperator($operator);
         $url['operator'] = $operator;
     }
     if ($operateTimeStart) {
         $so->setOperatorTimeStart(Pw::str2time($operateTimeStart));
         $url['operate_time_start'] = $operateTimeStart;
     }
     if ($operateTimeEnd) {
         $so->setOperatorTimeEnd(Pw::str2time($operateTimeEnd));
         $url['operate_time_end'] = $operateTimeEnd;
     }
     $service = Wekit::load('recycle.PwReplyRecycle');
     $count = $service->countSearchRecord($so);
     $threaddb = $service->searchRecord($so);
     $this->setOutput($threaddb, 'threaddb');
     $this->setOutput(Wekit::load('forum.srv.PwForumService')->getForumOption($fid), 'option_html');
     $this->setOutput(Wekit::load('forum.PwForum')->getForumList(), 'forumname');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput($count, 'count');
     $this->setOutput($url, 'url');
     // seo设置
     Wind::import('SRV:seo.bo.PwSeoBo');
     $lang = Wind::getComponent('i18n');
     PwSeoBo::setCustomSeo($lang->getMessage('SEO:manage.recycle.reply.title'), '', '');
 }