当前位置: 首页>>代码示例>>PHP>>正文


PHP Wind::import方法代码示例

本文整理汇总了PHP中Wind::import方法的典型用法代码示例。如果您正苦于以下问题:PHP Wind::import方法的具体用法?PHP Wind::import怎么用?PHP Wind::import使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Wind的用法示例。


在下文中一共展示了Wind::import方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getData

 protected function getData($field, $order, $limit, $offset)
 {
     Wind::import('SRV:forum.vo.PwForumSo');
     $so = new PwForumSo();
     //if ($field['fids']) {//if (count($field['fids']) > $limit) $field['fids'] = array_slice($field['fids'], 0, $limit);
     if ($field['fids'] && $field['fids'][0]) {
         $so->setFid($field['fids']);
     }
     switch ($order) {
         case '1':
             $so->orderbyThreads(false);
             break;
         case '2':
             $so->orderbyTodaythreads(false);
             break;
         case '3':
             $so->orderbyArticle(false);
             break;
         case '4':
             $so->orderbyLastPostTime(false);
             break;
     }
     $list = Wekit::load('forum.PwForum')->searchDesignForum($so, $limit, $offset);
     return $this->_buildSignKey($list);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:25,代码来源:PwDesignForumDataService.php

示例2: addlikeAction

 public function addlikeAction()
 {
     $this->getRequest()->isPost() || $this->showError('operate.fail');
     $fromid = (int) $this->getInput('fromid', 'post');
     $fromApp = $this->getInput('app', 'post');
     $subject = $this->getInput('subject', 'post');
     $url = $this->getInput('url', 'post');
     if ($fromid < 1 || empty($fromApp)) {
         $this->showError('BBS:like.fail');
     }
     $source = $this->_getLikeSourceDs()->getSourceByAppAndFromid($fromApp, $fromid);
     $newId = isset($source['sid']) ? (int) $source['sid'] : 0;
     Wind::import('SRV:like.dm.PwLikeSourceDm');
     if ($newId < 1) {
         $dm = new PwLikeSourceDm();
         $dm->setSubject($subject)->setSourceUrl($url)->setFromApp($fromApp)->setFromid($fromid)->setLikeCount(0);
         $newId = $this->_getLikeSourceDs()->addSource($dm);
     } else {
         $dm = new PwLikeSourceDm($source['sid']);
         $dm->setLikeCount($source['like_count']);
         $this->_getLikeSourceDs()->updateSource($dm);
     }
     $resource = $this->_getLikeService()->addLike($this->loginUser, 9, $newId);
     if ($resource instanceof PwError) {
         $this->showError($resource->getError());
     }
     $this->setOutput($resource, 'data');
     $this->showMessage('BBS:like.success');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:29,代码来源:SourceController.php

示例3: doeditAction

 public function doeditAction()
 {
     $tpl = $this->getInput('tpl', 'post');
     $compid = (int) $this->getInput('compid', 'post');
     $tpl = $this->_getDesignService()->filterTemplate($tpl);
     if (!$this->_getDesignService()->checkTemplate($tpl)) {
         $this->showError("DESIGN:template.error");
     }
     $property = $this->bo->getProperty();
     $limit = $this->compileFor($tpl);
     $property['limit'] = $limit ? $limit : $property['limit'];
     Wind::import('SRV:design.dm.PwDesignModuleDm');
     $dm = new PwDesignModuleDm($this->bo->moduleid);
     $dm->setModuleTpl($tpl)->setCompid($compid)->setProperty($property);
     $resource = $this->_getModuleDs()->updateModule($dm);
     if ($resource instanceof PwError) {
         $this->showError($resource->getError());
     }
     $module = $this->bo->getModule();
     Wekit::load('design.srv.PwSegmentService')->updateSegmentByPageId($module['page_id']);
     Wind::import('SRV:design.srv.data.PwAutoData');
     $srv = new PwAutoData($this->bo->moduleid);
     $srv->addAutoData();
     $this->_getDesignService()->clearCompile();
     if ($module['module_type'] == PwDesignModule::TYPE_SCRIPT) {
         $this->showMessage("operate.success", "design/module/run?type=api", true);
     } else {
         $this->showMessage("operate.success");
     }
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:30,代码来源:TemplateController.php

示例4: __construct

 public function __construct($forum)
 {
     Wind::import('SRV:forum.vo.PwThreadSo');
     $this->forum = $forum;
     $this->so = new PwThreadSo();
     $this->so->setFid($forum->fid)->setDisabled(0);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:PwSearchThread.php

示例5: _initInfo

 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));
     //获取头像 √
 }
开发者ID:taita2015,项目名称:NanaGate-2015,代码行数:28,代码来源:CustomController.php

示例6: sendAction

 /**
  * 发送动作页面,一般是ajax提交的数据
  */
 public function sendAction()
 {
     $act = $this->getInput('act', 'post');
     $uid = $this->getInput('uid', 'post');
     if (!$act) {
         $this->showError('请选择动作');
     }
     if (!$uid) {
         $this->showError('请选择用户');
     }
     !is_array($uid) && ($uid = array($uid));
     Wind::import('EXT:dongta.service.dm.App_Dongta_Dm');
     $service = Wekit::load('EXT:dongta.service.App_Dongta');
     $users = Wekit::load('user.PwUser')->fetchUserByUid($uid);
     $actMap = (include Wind::getRealPath('EXT:dongta.conf.dongta.php', true));
     $title = '<a href="' . WindUrlHelper::createUrl('space/index/run', array('uid' => $this->loginUser->uid)) . '">' . $this->loginUser->username . '</a> ' . str_replace('{Ta}', '你', $actMap[$act][1]);
     $content = $title . ' <br>[来自应用 <a href="' . WindUrlHelper::createUrl('app/dongta/index/run') . '">动他一下</a>]';
     foreach ($users as $key => $value) {
         $dm = new App_Dongta_Dm();
         $dm->setAct($act)->setTouid($value['uid'])->setCreatedUser($this->loginUser->uid, $this->loginUser->username)->setCreatedTime(Pw::getTime());
         $service->add($dm);
         Wekit::load('message.srv.PwNoticeService')->sendNotice($value['uid'], 'app', 0, array('title' => $title, 'content' => $content));
     }
     $this->showMessage('operate.success');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:28,代码来源:IndexController.php

示例7: run

 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');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:27,代码来源:AlipayController.php

示例8: postUpload

 protected function postUpload($tmp_name, $filename)
 {
     if (strpos($filename, '..') !== false || strpos($filename, '.php.') !== false || preg_match('/\\.php$/', $filename)) {
         exit('illegal file type!');
     }
     WindFolder::mkRecur(dirname($filename));
     if (function_exists("move_uploaded_file") && @move_uploaded_file($tmp_name, $filename)) {
         @unlink($tmp_name);
         @chmod($filename, 0777);
         return filesize($filename);
     } elseif (@copy($tmp_name, $filename)) {
         @unlink($tmp_name);
         @chmod($filename, 0777);
         return filesize($filename);
     } elseif (is_readable($tmp_name)) {
         Wind::import('WIND:utility.WindFile');
         WindFile::write($filename, WindFile::read($tmp_name));
         @unlink($tmp_name);
         if (file_exists($filename)) {
             @chmod($filename, 0777);
             return filesize($filename);
         }
     }
     return false;
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:25,代码来源:WindFormUpload.php

示例9: 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);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:34,代码来源:RightController.php

示例10: createAction

 /**
  * 我关注的人发起的投票
  *
  */
 public function createAction()
 {
     $page = $this->getInput('page');
     $page = $page < 1 ? 1 : intval($page);
     list($start, $limit) = Pw::page2limit($page, $this->perpage);
     $followUids = $this->getFollowUids($this->loginUser->uid);
     $total = $this->_getPwPollDs()->countPollByUids($followUids);
     $pollInfo = array();
     if ($total) {
         Wind::import('SRV:poll.srv.dataSource.PwFetchPollByUids');
         $pollDisplay = new PwPollDisplay(new PwFetchPollByUids($followUids, $limit, $start));
         $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($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');
     if (!$total) {
         $num = 20;
         $uids = $this->_getRecommendService()->getRecommendAttention($this->loginUser->uid, $num);
         $recommend = $this->_getRecommendService()->buildUserInfo($this->loginUser->uid, $uids, $num);
         $this->setOutput($recommend, 'recommend');
     }
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:32,代码来源:TaController.php

示例11: run

 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');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:27,代码来源:PaypalController.php

示例12: sendErrorMessage

 protected function sendErrorMessage($errorMessage, $errorcode)
 {
     if (!is_object($errorMessage)) {
         $_tmp = $errorMessage;
         /* @var $errorMessage WindErrorMessage */
         $errorMessage = Wind::getComponent('errorMessage');
         $errorMessage->addError($_tmp);
     }
     /* @var $router WindRouter */
     $moduleName = $this->handlerAdapter->getModule();
     if ($moduleName === 'error') {
         throw new WindFinalException($errorMessage->getError(0));
     }
     if (!($_errorAction = $errorMessage->getErrorAction())) {
         $module = $this->getModules($moduleName);
         $_errorClass = Wind::import(@$module['error-handler']);
         $_errorAction = 'error/' . $_errorClass . '/run/';
         $this->setModules('error', array('controller-path' => array_search($_errorClass, Wind::$_imports), 'controller-suffix' => '', 'error-handler' => ''));
     }
     /* @var $forward WindForward */
     $forward = Wind::getComponent('forward');
     $error = array('message' => $errorMessage->getError(), 'code' => $errorcode);
     $forward->forwardAction($_errorAction, array('__error' => $error, '__errorDir' => $this->getConfig('error-dir')), false, false);
     $this->doDispatch($forward);
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:25,代码来源:WindWebApplication.php

示例13: copyTopicType

 /**
  * 从A版块复制主题分类至B版块
  * 
  * @param int $fromFid
  * @param int $toFid
  */
 public function copyTopicType($fromFid, $toFid)
 {
     $this->_getTopictypeDs()->deleteTopicTypeByFid($toFid);
     $topicTypes = $this->_getTopictypeDs()->getTypesByFid($fromFid);
     $idMap = $subTopicTypes = array();
     Wind::import('SRV:forum.dm.PwTopicTypeDm');
     foreach ($topicTypes as $k => $v) {
         if ($v['parentid']) {
             $subTopicTypes[$k] = $v;
             continue;
         }
         $dm = new PwTopicTypeDm();
         $dm->setFid($toFid)->setIsSystem($v['issys'])->setVieworder($v['vieworder'])->setLogo($v['logo'])->setName($v['name']);
         $id = $this->_getTopictypeDs()->addTopicType($dm);
         $idMap[$v['id']] = $id;
     }
     if ($subTopicTypes) {
         foreach ($subTopicTypes as $k => $v) {
             $dm = new PwTopicTypeDm();
             $dm->setFid($toFid)->setIsSystem($v['issys'])->setVieworder($v['vieworder'])->setLogo($v['logo'])->setName($v['name'])->setParentId($idMap[$v['parentid']]);
             $this->_getTopictypeDs()->addTopicType($dm);
         }
     }
     return true;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:31,代码来源:PwTopicTypeService.php

示例14: doTxt

 /**
  * 导出当前页设计数据  已无用
  * Enter description here ...
  */
 protected function doTxt($pageInfo, $charset = 'utf-8')
 {
     Wind::import('SRV:design.srv.PwDesignExportTxt');
     $srv = new PwDesignExportTxt($pageInfo);
     $msg = $srv->txt($charset);
     $this->forceDownload($msg['content'], $msg['filename'] . '_' . $charset, $msg['ext'], $charset);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:11,代码来源:ExportController.php

示例15: dorunAction

 public function dorunAction()
 {
     Wind::import('WINDID:service.config.srv.WindidConfigSet');
     $config = new WindidConfigSet('site');
     $config->set('timezone', intval($this->getInput('timeTimezone', 'post')))->set('timecv', intval($this->getInput('timecv', 'post')))->flush();
     $this->showMessage('ADMIN:success');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:TimeController.php


注:本文中的Wind::import方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。