本文整理汇总了PHP中Wekit::setV方法的典型用法代码示例。如果您正苦于以下问题:PHP Wekit::setV方法的具体用法?PHP Wekit::setV怎么用?PHP Wekit::setV使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wekit
的用法示例。
在下文中一共展示了Wekit::setV方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:mess.notice.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例2: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:profile.right.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例3: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:vote.my.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例4: run
/**
* 谁看过我
*/
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:bbs.visitor.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例5: run
public function run()
{
//new add
$sign = $this->getInput('sign', 'get');
$sessionId = Pw::getCookie($this->_getLoginSessionService()->getCookieName());
$sessionInfo = App_Account_LoginSessionBo::getInstance($sessionId)->getSession();
$sessionData = $sessionInfo['sessiondata'];
$type = $sessionData['type'];
$nick = $sessionData['data']['nick'];
if (!$sessionId || !$this->_getAccountTypeService()->checkType($type) || $sessionData['data']['sign'] != $sign) {
$this->showError("非法访问");
}
$this->setOutput($this->_getAccountTypeService()->getTypeName($type), 'typeName');
$this->setOutput($sign, 'sign');
$data = array('username' => $nick);
$this->setOutput($data, 'data');
$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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:u.register.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例6: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
if ($this->page > 1) {
$seoBo->setCustomSeo($lang->getMessage('SEO:vote.hot.run.page.title', array($this->page)), $lang->getMessage('vote.hot.run.description'), '');
} else {
$seoBo->setCustomSeo($lang->getMessage('SEO:vote.hot.run.title'), '', $lang->getMessage('SEO:vote.hot.run.description'));
}
Wekit::setV('seo', $seoBo);
}
示例7: run
public function run()
{
$id = (int) $this->getInput('id', 'get');
$portal = $this->_getPortalDs()->getPortal($id);
if (!$portal) {
$this->showError("page.status.404");
}
if (!$portal['isopen']) {
$permissions = $this->_getPermissionsService()->getPermissionsForUserGroup($this->loginUser->uid);
if ($permissions < 1) {
$this->showError("page.status.404");
}
}
$this->setOutput($portal, 'portal');
if ($portal['navigate']) {
$this->setOutput($this->headguide($portal['title']), 'headguide');
}
if ($portal['template']) {
$url = WindUrlHelper::checkUrl(PUBLIC_THEMES . '/portal/local/' . $portal['template'], PUBLIC_URL);
$design['url']['css'] = $url . '/css';
$design['url']['images'] = $url . '/images';
$design['url']['js'] = $url . '/js';
Wekit::setGlobal($design, 'design');
$this->setTemplate("THEMES:portal.local." . $portal['template'] . ".template.index");
} else {
$this->setTemplate("TPL:special.index_run");
}
//$this->getForward()->getWindView()->compileDir = 'DATA:design.default.' . $id;
$this->setT($portal['template'], 'THEMES:portal.local');
Wind::import('SRV:seo.bo.PwSeoBo');
$seoBo = PwSeoBo::getInstance();
$seoBo->init('area', 'custom', $id);
$seoBo->set('{pagename}', $portal['title']);
Wekit::setV('seo', $seoBo);
}
示例8: run
/**
* 关注-首页
*/
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()->getOnlneUids($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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:bbs.follow.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例9: run
public function run()
{
//seo设置
Wind::import('SRV:seo.bo.PwSeoBo');
$seoBo = PwSeoBo::getInstance();
$seoBo->init('like', 'hot');
Wekit::setV('seo', $seoBo);
}
示例10: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:u.register.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例11: run
/**
* 推荐关注
*/
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:bbs.friend.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例12: run
public function run()
{
$order = $this->getInput('order', 'get');
$page = intval($this->getInput('page', 'get'));
$threadList = new PwThreadList();
$this->runHook('c_index_run', $threadList);
$threadList->setPage($page)->setPerpage(Wekit::C('bbs', 'thread.perpage'));
Wind::import('SRV:forum.srv.threadList.PwNewThread');
$forbidFids = Wekit::load('forum.srv.PwForumService')->getForbidVisitForum($this->loginUser, null, true);
$dataSource = new PwNewThread($forbidFids);
if ($order == 'postdate') {
$dataSource->setOrderBy($order);
} else {
$dataSource->setOrderBy('lastpost');
}
$threadList->execute($dataSource);
if ($threadList->total > 12000) {
Wekit::load('forum.PwThreadIndex')->deleteOver($threadList->total - 10000);
}
$threaddb = $threadList->getList();
$fids = array();
foreach ($threaddb as $key => $value) {
$fids[] = $value['fid'];
}
$forums = Wekit::load('forum.srv.PwForumService')->fetchForum($fids);
if ($operateThread = $this->loginUser->getPermission('operate_thread', false, array())) {
$operateThread = Pw::subArray($operateThread, array('delete'));
}
$this->setOutput($threadList, 'threadList');
$this->setOutput($threaddb, 'threaddb');
$this->setOutput($forums, 'forums');
$this->setOutput($threadList->icon, 'icon');
$this->setOutput($threadList->uploadIcon, 'uploadIcon');
$this->setOutput(26, 'numofthreadtitle');
$this->setOutput($order, 'order');
$this->setOutput($operateThread, 'operateThread');
$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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$threadList->page <= 1 && $seoBo->setDefaultSeo($lang->getMessage('SEO:bbs.forum.run.title'), '', $lang->getMessage('SEO:bbs.forum.run.description'));
$seoBo->init('bbs', 'new');
$seoBo->set('{page}', $threadList->page);
Wekit::setV('seo', $seoBo);
}
示例13: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:u.login.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例14: run
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');
$seoBo = PwSeoBo::getInstance();
$lang = Wind::getComponent('i18n');
$seoBo->setCustomSeo($lang->getMessage('SEO:profile.password.run.title'), '', '');
Wekit::setV('seo', $seoBo);
}
示例15: run
public function run()
{
if (($result = $this->_checkRight()) instanceof PwError) {
$this->showError($result->getError());
}
list($page, $perpage, $keywords, $fid, $limittime, $orderby) = $this->getInput(array('page', 'perpage', 'keywords', 'fid', 'limittime', 'orderby'));
if ($keywords) {
//最后搜索时间
if (($result = $this->_checkSearch()) instanceof PwError) {
$this->showError($result->getError());
}
$page = $page ? $page : 1;
$perpage = $perpage ? $perpage : $this->perpage;
list($start, $limit) = Pw::page2limit($page, $perpage);
!$orderby && ($orderby = 'lastpost_time');
Wind::import('SRV:forum.vo.PwThreadSo');
$so = new PwThreadSo();
$keywords = urldecode($keywords);
$so->setKeywordOfTitleOrContent($keywords);
$fid && $so->setFid($fid);
$limittime && $so->setCreateTimeStart($this->_getLimitTime($limittime));
$so = $this->_getOrderBy($so, $orderby);
$count = $this->_getSearchService()->countSearchThread($so);
$count = $count > $this->maxNum ? $this->maxNum : $count;
if ($count) {
$threads = $this->_getSearchService()->searchThread($so, $limit, $start);
$threads = $this->_getSearchService()->buildThreads($threads, $keywords);
$this->_replaceRecord($keywords, App_Search_Record::TYPE_THREAD);
}
$this->setOutput($page, 'page');
$this->setOutput($perpage, 'perpage');
$this->setOutput($count, 'count');
$this->setOutput($threads, 'threads');
$this->setOutput(array(1 => 'img', 3 => 'img', 4 => 'file', 5 => 'img', 7 => 'img'), 'uploadIcon');
$this->setOutput(array('img' => '图片帖', 'file' => '附件'), 'icon');
}
$args = array('keywords' => $keywords, 'fid' => $fid, 'limittime' => $limittime, 'orderby' => $orderby);
$this->setOutput($args, 'args');
$forumList = Wekit::load('forum.srv.PwForumService')->getForumList();
$this->setOutput(App_Search_Record::TYPE_THREAD, 'recordType');
$this->setOutput($forumList, 'forumList');
$this->setOutput($this->getCommonForumList($forumList), 'forumdb');
$this->setTemplate('index_run');
//seo设置
$seoBo = PwSeoBo::getInstance();
$seoBo->setCustomSeo($keywords . ' - {sitename}', '', '');
Wekit::setV('seo', $seoBo);
}