protected function run() { $forum = new PwForumBo($this->fid, true); if (!$forum->isForum(true)) { return new PwError('BBS:forum.unite.error.fid.exists.not'); } if ($forum->foruminfo['type'] == 'category') { return new PwError('BBS:forum.unite.error.fid.category'); } if ($forum->getSubForums()) { return new PwError('BBS:forum.unite.error.hassub'); } $toforum = new PwForumBo($this->tofid); if (!$toforum->isForum(true)) { return new PwError('BBS:forum.unite.error.tofid.exists.not'); } if ($toforum->foruminfo['type'] == 'category') { return new PwError('BBS:forum.unite.error.tofid.category'); } if ($this->fid == $this->tofid) { return new PwError('BBS:forum.unite.error.same'); } Wekit::load('forum.PwForum')->deleteForum($this->fid); Wind::import('SRV:forum.dm.PwForumDm'); $dm = new PwForumDm($this->tofid); $dm->addThreads($forum->foruminfo['threads'])->addPosts($forum->foruminfo['posts']); Wekit::load('forum.PwForum')->updateForum($dm, PwForum::FETCH_STATISTICS); Wekit::load('forum.srv.PwForumService')->updateForumStatistics($forum->foruminfo['parentid']); Wekit::load('forum.srv.PwForumService')->updateForumStatistics($this->tofid); return true; }
public function postHandle() { //门户管理模式 编译目录切换 if ($this->getRequest()->getPost('design')) { $loginUser = Wekit::getLoginUser(); $designPermission = $loginUser->getPermission('design_allow_manage.push'); if ($designPermission > 0) { $dir = Wind::getRealDir('DATA:design.template'); if (is_dir($dir)) { WindFolder::rm($dir, true); } $this->forward->getWindView()->compileDir = 'DATA:design.template'; } } // SEO settings Wind::import('SRV:seo.bo.PwSeoBo'); $sitename = Wekit::C('site', 'info.name'); PwSeoBo::set('{sitename}', $sitename); Wekit::setGlobal(NEXT_VERSION . ' ' . NEXT_RELEASE, 'version'); Wekit::setGlobal(PwSeoBo::getData(), 'seo'); $this->setOutput($this->getRequest()->getIsAjaxRequest() ? '1' : '0', '_ajax_'); /*[设置给PwGlobalFilters需要的变量]*/ $_var = array('current' => $this->forward->getWindView()->templateName, 'a' => $this->router->getAction(), 'c' => $this->router->getController(), 'm' => $this->router->getModule()); $this->getResponse()->setData($_var, '_aCloud_'); Wekit::load('APPS:appcenter.service.srv.PwDebugApplication')->compile(); }
public function beforeAction($handlerAdapter) { parent::beforeAction($handlerAdapter); $spaceUid = (int) $this->getInput('uid', 'get'); if ($spaceUid < 1) { $userName = $this->getInput('username', 'get'); $user = Wekit::load('user.PwUser')->getUserByName($userName); $spaceUid = isset($user['uid']) ? $user['uid'] : 0; } if ($spaceUid < 1) { $this->forwardRedirect(WindUrlHelper::createUrl('u/login/run/')); } $this->space = new PwSpaceBo($spaceUid); if (!$this->space->space['uid']) { $user = Wekit::load('user.PwUser')->getUserByUid($spaceUid); if ($user) { Wekit::load('space.dm.PwSpaceDm'); $dm = new PwSpaceDm($spaceUid); $dm->setVisitCount(0); Wekit::load('space.PwSpace')->addInfo($dm); $this->space = new PwSpaceBo($spaceUid); } else { $this->forwardRedirect(WindUrlHelper::createUrl('u/login/run/')); } } $this->space->setTome($spaceUid, $this->loginUser->uid); $this->space->setVisitUid($this->loginUser->uid); $this->setTheme('space', null); if ($this->space->allowView('space')) { $this->forwardRedirect(WindUrlHelper::createUrl('space/index/run', array('uid' => $spaceUid))); } }
public function compile($key, $content) { $content = array(); $content[] = '<?php'; if (Wekit::load('APPCENTER:service.srv.PwDebugApplication')->inDevMode2()) { $_content = $this->_devHook(); $content[] = 'echo \'' . $_content . '\';'; } if (!$this->args) { $this->args = ''; } else { $this->args = preg_replace(array('/\\s*array\\s*\\(\\s*/i', '/\\s*\\)\\s*$/i'), '', $this->args); } $this->method = $this->method ? $this->method : 'runDo'; if ($this->class) { $this->args = "'" . $this->name . "'" . ($this->args ? "," . $this->args : ''); $callback = 'array(' . $this->class . ', "' . $this->method . '")'; } elseif ($this->name) { $callback = 'array(PwSimpleHook::getInstance("' . $this->name . '"), "' . $this->method . '")'; } else { $callback = '"' . $this->method . '"'; } $this->args = 'array(' . $this->args . ')'; $this->alias = trim($this->alias); $content[] = 'PwHook::display(' . $callback . ', ' . $this->args . ', "' . $this->alias . '", $__viewer);'; $content[] = '?>'; return implode("\r\n", $content); }
public function createHtmlAfterUserInfo($user, $read) { $showuserinfo = Wekit::C('site', 'app.torrent.showuserinfo'); if (is_array($showuserinfo) && !in_array('threadside', $showuserinfo)) { return; } $peers = Wekit::load('EXT:torrent.service.PwTorrentPeer')->fetchTorrentPeerByUid($user['uid']); $torrents = Wekit::load('EXT:torrent.service.PwTorrent')->fetchTorrentByUid($user['uid']); $histories = Wekit::load('EXT:torrent.service.PwTorrentHistory')->fetchTorrentHistoryByUid($user['uid']); $seeding = $leeching = 0; if (is_array($peers)) { foreach ($peers as $peer) { if ($peer['seeder'] == 'yes') { $seeding++; } else { $leeching++; } } } if (is_array($histories)) { foreach ($histories as $history) { $downloaded_total += $history['downloaded']; $uploaded_total += $history['uploaded']; } } if ($downloaded_total != 0) { $rotio = round($uploaded_total / $downloaded_total, 2); } else { $rotio = 'Inf.'; } echo '<div id="PTInfo">下载:' . $leeching . '<br>做种:' . $seeding . '<br>发布: ' . count($torrents) . '<br>分享率: ' . $rotio . '<br>下载量: ' . PwUtils::readableDataTransfer($downloaded_total) . '<br>上传量: ' . PwUtils::readableDataTransfer($uploaded_total) . '</div>'; }
public function appDo($space) { if (!in_array('profile', Wekit::C('site', 'app.torrent.showuserinfo'))) { return ''; } $user = Wekit::load('EXT:torrent.service.PwTorrentUser')->getTorrentUserByUid($space->{'spaceUid'}); $torrents = Wekit::load('EXT:torrent.service.PwTorrent')->fetchTorrentByUid($space->{'spaceUid'}); $histories = Wekit::load('EXT:torrent.service.PwTorrentHistory')->fetchTorrentHistoryByUid($space->{'spaceUid'}); $passkey = $user['passkey']; $posted = count($torrents); foreach ($histories as $history) { $downloaded_total += $history['downloaded']; $uploaded_total += $history['uploaded']; } $downloaded_total = floor($downloaded_total / 1048567); $uploaded_total = floor($uploaded_total / 1048567); if ($downloaded_total != 0) { $rotio = round($uploaded_total / $downloaded_total, 2); } else { $rotio = 'Inf.'; } echo '<div class="space_profile"><h3><strong>PT个人信息</strong></h3>'; if ($space->{'visitUid'} == $space->{'spaceUid'}) { echo '<dl class="cc"><dt>Passkey:</dt><dd><span id="passkey" style="background-color:rgb(51,51,51); color:rgb(51,51,51);">' . $passkey . '</span> <button class="btn" id="btnToggle" onclick="if ($(\'#btnToggle\').text() == \'显示\') {$(\'#passkey\').css(\'background\', \'white\'); $(\'#btnToggle\').text(\'隐藏\');} else {$(\'#passkey\').css(\'background\', \'rgb(51,51,51)\');$(\'#btnToggle\').text(\'显示\');}">显示</button></dd></dl>'; echo '<dl class="cc"><dt>订阅地址:</dt><dd><a href="' . WindUrlHelper::createUrl('/app/torrent/index/rss?uid=' . $space->{'spaceUid'} . '&passkey=' . $passkey) . '">RSS 链接(请勿泄露)</a><a href="' . WindUrlHelper::createUrl('/app/torrent/index/my') . '" class="btn">管理</a></dd></dl>'; } echo '<dl class="cc"><dt>下载:</dt><dd>' . $downloaded_total . ' M</dd></dl>'; echo '<dl class="cc"><dt>上传:</dt><dd>' . $uploaded_total . ' M</dd></dl>'; echo '<dl class="cc"><dt>分享率:</dt><dd>' . $rotio . '</dd></dl>'; echo '<dl class="cc"><dt>发布:</dt><dd>' . $posted . '</dd></dl>'; echo '</div>'; }
public function run() { $dm = new PwTopicDm(true); $dm->addLastposttime(-$this->downtime)->setDowned($this->downed); Wekit::load('forum.PwThread')->batchUpdateThread($this->tids, $dm, PwThread::FETCH_MAIN); Wekit::load('log.srv.PwLogService')->addThreadManageLog($this->srv->user, 'down', $this->srv->getData(), $this->_reason, $this->downtime); }
public function run($uid) { /* @var $srv PwMessageService */ $srv = Wekit::load('SRV:message.srv.PwMessageService'); $srv->deleteUserMessages($uid, true, true); return true; }
public function gainReward($uid, $reward, $taskname) { $userBo = Wekit::getLoginUser(); list($id) = explode('-', $reward['value'], 2); $time = abs(intval($reward['time'])); /* @var $userBelongDs PwUserBelong */ $userBelongDs = Wekit::load('user.PwUserBelong'); $info = $userBelongDs->getUserBelongs($uid); $_groups = array(); foreach ($info as $_item) { $_groups[$_item['gid']] = $_item['endtime']; } $_groups[$id] = $time ? Pw::getTime() + 24 * 3600 * $time : 0; /* @var $userService PwUserService */ $userService = Wekit::load('user.srv.PwUserService'); list($gid, $groups) = $userService->caculateUserGroupid($userBo->gid, $_groups); $dm = new PwUserInfoDm($uid); $dm->setGroupid($gid)->setGroups($groups); /* @var $userDs PwUser */ $userDs = Wekit::load('user.PwUser'); $result = $userDs->editUser($dm, PwUser::FETCH_MAIN); if ($result instanceof PwError) { return $result; } return true; }
/** * 执行搜索 * @return array */ public function search() { $result = array(); //$resource = Wind::getComponent('i18n'); $parser = Wekit::load('ADMIN:service.srv.AdminSearchLangParserService'); $texts = $parser->parseSearchLang(); foreach ($this->_menus as $k1 => $v1) { list($s1, $t1) = $this->_check($v1['name']); if ($s1) { $v1['name'] = $t1; $result[$k1] = $v1; } //$desc = $resource->getMessage("ADMIN:search.{$k}"); $desc = $texts[$k1]; if ($desc) { $subItems = array(); $matchMain = false; if (is_array($desc['items'])) { foreach ($desc['items'] as $v) { list($s, $t) = $this->_check($v); if ($s) { $result[$k1]['items'][] = $t; $matchMain = true; } } } if (count($desc) > 1) { //二级 foreach ($desc as $k2 => $v2) { if ($k2 == 'items') { continue; } $tmp = array(); if ($v2['items']) { foreach ($v2['items'] as $v3) { list($s, $t) = $this->_check($v3); $s && ($tmp['items'][] = $t); } if ($tmp['items']) { $tmp['name'] = $k2; $tmp['url'] = $v2['url']; } } $tmp && ($subItems[] = $tmp); } } if ($matchMain || $subItems) { $tmp = null; if (!$s1) { $result[$k1]['items'] && ($tmp = $result[$k1]['items']); $v1['name'] = $t1; $result[$k1] = $v1; } $result[$k1]['sub'] = $subItems; $tmp && ($result[$k1]['items'] = $tmp); } } } return $result; }
public function __get($name) { $data = Wekit::load('config.PwConfig')->getValues($name); $config = new PwConfigIniBo($data); $this->{$name} = $config; return $config; }
public function check($postDm) { $data = $postDm->getData(); $content = Pw::substrs(Pw::stripWindCode($data['content']), 30) == $data['subject'] ? $data['content'] : $data['subject'] . $data['content']; $banedStrLen = strlen($data['subject']); $wordFilter = Wekit::load('SRV:word.srv.PwWordFilter'); list($type, $words, $isTip) = $wordFilter->filterWord($content); if (!$type) { return true; } $words = array_unique($words); foreach ($words as $k => $v) { if ($k < $banedStrLen) { return new PwError('WORD:content.error.tip', array('{wordstr}' => implode(',', $words))); } } switch ($type) { case 1: return new PwError('WORD:content.error.tip', array('{wordstr}' => implode(',', $words))); case 2: $this->_isVerified = 1; if ($this->_confirm) { return true; } case 3: $this->_word = 1; default: return true; } return true; }
private function _initInfo() { $this->uid = wekit::getLoginUser()->info['uid']; // dump($this->uid); $this->username = wekit::getLoginUser()->info['username']; $this->onlinetime = intval(intval(wekit::getLoginUser()->info['onlinetime']) / 3600); // $this->ip= wekit::getLoginUser()->info['lastloginip']; // $this->ip=$_SERVER["REMOTE_ADDR"]; $this->ip = $this->GetIP(); Wind::import('SRV:credit.bo.PwCreditBo'); $userBelongSrv = Wekit::load('SRV:user.PwUserBelong'); // dump($userBelongSrv->getUserBelongs(7)); $this->gid = wekit::getLoginUser()->info['groupid']; //$this->gid=8;//0 NULL 1会员2游客3管理员4总版主5论坛版主6禁止发言7未验证会员 if (($group = Wekit::cache()->get('group', $this->gid)) === false) { $group = Wekit::cache()->get('group', 1); } // dump(Wekit::$_app); // dump($this->gid); //2015.1.17关闭group if ($group) { $this->groupInfo = array('name' => $group['name'], 'type' => $group['type'], 'image' => $group['image'], 'points' => $group['points']); $this->permission = $group['permission']; } // dump($this->groupInfo); $this->avatarPath = str_replace('_middle', '', Pw::getAvatar($this->uid)); //获取头像 √ }
/** * 设置伪静态 */ public function doModifyAction() { list($format, $isopen) = $this->getInput(array('format', 'isopen')); $bo = new PwConfigSet('rewrite'); foreach ($format as $k => $v) { if (empty($v) && isset($isopen[$k])) { $this->showError('REWRITE:format.empty'); } $bo->set("format.{$k}", $v); } $addons = Wekit::load('domain.srv.PwDomainService')->getRewriteAddOns(); $rewriteData = array(); $unique = array(); foreach ($addons as $k1 => $v1) { $open = isset($isopen[$k1]) ? 1 : 0; $bo->set("isopen.{$k1}", $open); if ($open) { $format_i = preg_replace('/\\{\\w+\\}/', '', $format[$k1]); if (in_array($format_i, $unique)) { $this->showError(array('REWRITE:format.conflict', array($format[$k1]))); } $unique[] = $format_i; if ($k1 == 'thread') { $rewriteData['cate'] = array('format' => $format[$k1], 'pattern' => $this->_compileFormat($format[$k1]), 'route' => 'bbs/cate/run'); } $rewriteData[$k1] = array('format' => $format[$k1], 'pattern' => $this->_compileFormat($format[$k1]), 'route' => $v1[2]); } } $bo->flush(); Wekit::C()->setConfig('site', 'rewrite', $rewriteData); Wekit::load('domain.srv.PwDomainService')->refreshTplCache(); Wekit::load('SRV:nav.srv.PwNavService')->updateConfig(); $this->showMessage('success'); }
public function unInstall($install) { /* @var $ds PwConfig */ $ds = Wekit::load('config.PwConfig'); $ds->deleteConfig('app_majia'); return true; }
public function run($ids) { Wind::import('SRV:forum.dm.PwTopicDm'); Wind::import('SRV:forum.dm.PwReplyDm'); $threadDs = Wekit::load('forum.PwThread'); $forumSrv = Wekit::load('forum.srv.PwForumService'); foreach ($this->tids as $tid => $value) { $dm1 = new PwReplyDm(true); $dm1->setTid($tid); $value['disabled'] != 2 && $dm1->setDisabled(0); $threadDs->batchUpdatePost($value['ids'], $dm1); $post = current(Wekit::load('forum.PwThread')->getPostByTid($tid, 1, 0, false)); $dm = new PwTopicDm($tid); $dm->addReplies($value['replies']); $post && $dm->setLastpost($post['created_userid'], $post['created_username'], $post['created_time']); $threadDs->updateThread($dm, PwThread::FETCH_MAIN); } foreach ($this->fids as $fid => $value) { $forumSrv->updateStatistics($fid, 0, $value); } foreach ($this->rpids as $rpid => $value) { $dm = new PwReplyDm($rpid); $dm->addReplies($value); $threadDs->updatePost($dm); } Wekit::load('recycle.PwReplyRecycle')->batchDelete($ids); }
public function welcome(PwUserBo $userBo, $ip) { Wind::import('SRV:user.srv.PwBanBp'); $banBp = new PwBanBp($userBo->uid); if ($banBp->checkIfBan()) { if (Pw::getstatus($userBo->info['status'], PwUser::STATUS_BAN_AVATAR) && false === $banBp->checkIfBanAvatar()) { $banBp->recoveryBanAvatarError(); } else { $banBp->endDateTimeBanAvatar(); } if (Pw::getstatus($userBo->info['status'], PwUser::STATUS_BAN_SIGN) && false === $banBp->checkIfBanSign()) { $banBp->recoveryBanSignError(); } else { $banBp->endDateTimeBanSign(); } if ($userBo->gid == 6 && false == $banBp->checkIfBanSpeak()) { $banBp->recoveryBanSpeaKError(); } else { $banBp->endDateTimeBanSpeak(); } $userBo->info = array_merge($userBo->info, Wekit::load('user.PwUser')->getUserByUid($userBo->uid)); $userBo->gid = $userBo->info['groupid'] == 0 ? $userBo->info['memberid'] : $userBo->info['groupid']; if ($userBo->info['groups']) { $userBo->groups = explode(',', $userBo->info['groups']); } $userBo->groups[] = $this->gid; } return $userBo; }
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'), '', ''); }
protected function _getActiveUser($fid, $day, $num) { $time = Pw::getTime() - $day * 86400; $array = array(); $thread = Wekit::load('forum.PwThreadExpand')->countUserThreadByFidAndTime($fid, $time, $num); $post = Wekit::load('forum.PwThreadExpand')->countUserPostByFidAndTime($fid, $time, $num); foreach ($thread as $key => $value) { if (!$key) { continue; } $array[$key] = $value['count']; } foreach ($post as $key => $value) { if (!$key) { continue; } if (isset($array[$key])) { $array[$key] += $value['count']; } else { $array[$key] = $value['count']; } } arsort($array); return array_slice($array, 0, $num, true); }
public function run() { $order = Wekit::load('pay.PwOrder')->getOrderByOrderNo($this->_var['out_trade_no']); if (empty($order)) { $this->paymsg('onlinepay.order.exists.not'); } $fee = $order['number'] * $order['price']; if ($fee != $this->_var['total_fee'] || $this->_var['seller_email'] != $this->_conf['alipay']) { $this->paymsg('onlinepay.fail'); } if (!in_array($this->_var['trade_status'], array('TRADE_FINISHED', 'TRADE_SUCCESS', 'WAIT_SELLER_SEND_GOODS'))) { $this->paymsg('onlinepay.success'); } if ($order['state'] == 2) { $this->paymsg('onlinepay.order.paid'); } $className = Wind::import('SRV:pay.srv.action.PwPayAction' . $order['paytype']); if (class_exists($className)) { $class = new $className($order); $class->run(); } Wind::import('SRV:pay.dm.PwOrderDm'); $dm = new PwOrderDm($order['id']); $dm->setPayemail($this->_var['buyer_email'])->setState(2)->setPaymethod(1); Wekit::load('pay.PwOrder')->updateOrder($dm); $this->paymsg('onlinepay.success'); }
/** * 忽略 * * @param array $notice */ public function ignoreNotice($notice, $ignore = 1) { if (!$notice) { return false; } return Wekit::load('message.srv.PwNoticeService')->setIgnoreNotice($notice['typeid'], $notice['uid'], $ignore); }
public function addPost($pid, $tid) { if ($pid < 1 && $tid < 1) { return false; } return Wekit::load('like.PwLikeContent')->updateLastPid($this->likeid, $pid); }
public function afterRegister($userDm) { if ($this->bp->config['type'] != 2) { return false; } /* @var $inviteDs PwInviteCode */ $inviteDs = Wekit::load('invite.PwInviteCode'); if ($this->inviteInfo['created_userid']) { $codeDm = new PwInviteCodeDm(); $codeDm->setInvitedUid($userDm->uid)->setModifiedTime(Pw::getTime())->setIfused(1)->setCode($this->code); //别人赠送的邀请码 $inviteDs->updateCode($codeDm); $creditType = $this->bp->config['invite.reward.credit.type']; $creditNum = $this->bp->config['invite.reward.credit.num']; //邀请人获得加奖励 //[积分日志] 成功邀请好友积分奖励 /* @var $creditBo PwCreditBo */ $creditBo = PwCreditBo::getInstance(); $creditBo->addLog('invite_reward', array($creditType => $creditNum), new PwUserBo($this->inviteInfo['created_userid']), array('friend' => $userDm->getField('username'))); $creditBo->set($this->inviteInfo['created_userid'], $creditType, $creditNum); //邀请成功相互关注 被邀请者关注邀请者 /* @var $attention PwAttentionService */ $attention = Wekit::load('attention.srv.PwAttentionService'); $attention->addFollow($userDm->uid, $this->inviteInfo['created_userid']); // $attention->addFollow($this->inviteInfo['created_userid'], $userDm->uid); } else { $codeDm = new PwInviteCodeDm(); $codeDm->setInvitedUid($userDm->uid)->setIfused(1)->setModifiedTime(Pw::getTime())->setCreateUid($userDm->uid)->setCode($this->code); //自己购买的邀请码 $inviteDs->updateCode($codeDm); } return true; }
public function run($ids) { $srv = Wekit::load('forum.srv.PwForumService'); foreach ($this->record as $fid => $value) { $srv->updateStatistics($fid, 0, -$value); } }
public function run() { $order = Wekit::load('pay.PwOrder')->getOrderByOrderNo($this->_var['invoice']); if (empty($order)) { $this->paymsg('onlinepay.order.exists.not'); } $fee = $order['number'] * $order['price']; if ($fee != $this->_var['mc_gross']) { $this->paymsg('onlinepay.fail'); } if ($this->_var['payment_status'] != 'Completed') { $this->paymsg('onlinepay.success'); } if ($order['state'] == 2) { $this->paymsg('onlinepay.order.paid'); } $className = Wind::import('SRV:pay.srv.action.PwPayAction' . $order['paytype']); if (class_exists($className)) { $class = new $className($order); $class->run(); } Wind::import('SRV:pay.dm.PwOrderDm'); $dm = new PwOrderDm($order['id']); $dm->setState(2)->setPaymethod(3); Wekit::load('pay.PwOrder')->updateOrder($dm); $this->paymsg('onlinepay.success'); }
public function run($ids) { Wekit::load('attention.PwFresh')->batchDeleteByType(PwFresh::TYPE_THREAD_TOPIC, $ids); //回复与新鲜事的关联 if ($data = Wekit::load('attention.PwFreshIndex')->fetchByTid($ids)) { Wekit::load('attention.PwFresh')->batchDelete(array_keys($data)); } }
public function addFollow($uid, $touid) { $userDs = Wekit::load('user.PwUser'); $userInfo = $userDs->getUserByUid($uid, PwUser::FETCH_MAIN); // 加完关注发通知 Wekit::load('message.srv.PwNoticeService')->sendNotice($touid, 'attention', $touid, array($uid => array('uid' => $uid, 'username' => $userInfo['username']))); return true; }
public function createHtml($spaceBo) { if (!$spaceBo->allowView('work')) { return false; } $spaceBo->spaceUser['work'] = Wekit::load('work.PwWork')->getByUid($spaceBo->spaceUid); PwHook::template('work', 'TPL:space.profile_extend', true, $spaceBo); }
public function run() { $topicDm = new PwTopicDm(true); $topicDm->setLastposttime($this->uptime); Wekit::load('forum.PwThread')->batchUpdateThread($this->tids, $topicDm, PwThread::FETCH_MAIN); //管理日志添加 Wekit::load('log.srv.PwLogService')->addThreadManageLog($this->srv->user, 'up', $this->srv->getData(), $this->_reason, $this->uptime); }
public function run($ids) { Wekit::load('forum.PwPostsTopped')->batchDeleteTopped($this->record); Wind::import('SRV:forum.dm.PwTopicDm'); $dm = new PwTopicDm(true); $dm->addReplyTopped(-1); Wekit::load('forum.PwThread')->batchUpdateThread($this->tids, $dm, PwThread::FETCH_MAIN); }