• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Wind类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例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: getMethod

 protected function getMethod($operation)
 {
     $config = (include Wind::getRealPath('WINDID:service.base.WindidNotifyConf.php', true));
     $method = isset($config[$operation]['method']) ? $config[$operation]['method'] : '';
     $args = isset($config[$operation]['args']) ? $config[$operation]['args'] : array();
     return array($method, $args);
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:7,代码来源:IndexController.php


示例7: afterAction

 public function afterAction($handlerAdapter)
 {
     parent::afterAction($handlerAdapter);
     $debug = Wekit::C('site', 'debug') || !Wekit::C('site', 'css.compress');
     Wekit::setGlobal(array('debug' => $debug ? '/dev' : '/build'), 'theme');
     $this->setTheme('site', null);
     /* @var $resource WindLangResource */
     $resource = Wind::getComponent('i18n');
     $_error = $this->getForward()->getVars('message');
     if ($resource !== null) {
         foreach ($_error as $key => $value) {
             if (is_array($value)) {
                 list($value, $var) = $value;
             } else {
                 $var = array();
             }
             $message = $resource->getMessage($value, $var);
             $message && ($_error[$key] = $message);
         }
     }
     $this->getForward()->setVars(array('message' => $_error, '__error' => ''));
     $type = $this->getRequest()->getAcceptTypes();
     // 如果是含有上传的递交,不能采用ajax的方式递交,需要以html的方式递交,并且返回的结果需要是json格式,将以json=1传递过来标志
     $json = $this->getInput('_json');
     $requestJson = $this->getRequest()->getIsAjaxRequest() && strpos(strtolower($type), "application/json") !== false;
     if ($requestJson || $json == 1) {
         $this->getResponse()->setHeader('Content-type', 'application/json; charset=' . Wekit::V('charset'));
         echo Pw::jsonEncode($this->getForward()->getVars());
         exit;
     }
 }
开发者ID:BTSnowball,项目名称:BTSnowball_Users_Hand,代码行数:31,代码来源:PwErrorController.php


示例8: run

 public function run()
 {
     $this->_setNavType('schoolarea');
     $allArea = $this->_getAreaDs()->getAreaByParentid(0);
     $allArea = array_values($allArea);
     //check if has province id or not, if has, then school list need to based on that
     //get province from url
     $choosenProvinceid = $this->getInput('choosenProvinceid');
     if (!isset($choosenProvinceid) || $choosenProvinceid <= 0) {
         $choosenProvinceid = $allArea[0]['areaid'];
     }
     $allSchool = $this->_getSchoolDs()->getSchoolByAreaidAndTypeid($choosenProvinceid, 3);
     $allSchool = array_values($allSchool);
     $this->setOutput($allSchool, 'allSchool');
     $choosenSchoolid = $this->getInput('choosenSchoolid');
     if (!isset($choosenSchoolid) || $choosenSchoolid <= 0) {
         $choosenSchoolid = $allSchool[0]['schoolid'];
     }
     //check if it is from search, if from search, then search by selected university
     if ($this->getInput('search', 'post') === 'search') {
         $choosenSchoolid = $this->getInput('choosenSchoolid', 'post');
         $areaList = $this->_getSchoolAreaDs()->getBySchoolid($choosenSchoolid);
         $choosenProvinceid = $this->getInput('choosenProvinceid', 'post');
     } else {
         //get first school and show its area
         Wind::import('EXT:4tschool.service.dm.App_SchoolArea_Dm');
         $areaList = $this->_getSchoolAreaDs()->getBySchoolid($choosenSchoolid);
         //print_r($areaList);die;
     }
     $this->setOutput($choosenProvinceid, 'choosenProvinceid');
     $this->setOutput($choosenSchoolid, 'choosenSchoolid');
     $this->setOutput($areaList, 'areaList');
     $this->setOutput($allArea, 'allArea');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:34,代码来源:SchoolareaController.php


示例9: __construct

 /**
  * 初始化安装程序
  */
 public function __construct()
 {
     $this->_appId = 'L000' . time() . WindUtility::generateRandStr(4);
     $this->_config = @(include Wind::getRealPath(self::CONF_PATH, true));
     $this->tmpPath = Wind::getRealPath($this->getConfig('tmp_dir') . '.' . Pw::getTime(), false);
     $this->tmpInstallLog = Wind::getRealPath($this->getConfig('log_dir'), false);
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:10,代码来源:PwInstallApplication.php


示例10: doftpAction

 /**
  * 后台设置-ftp设置
  */
 public function doftpAction()
 {
     Wind::import('WINDID:service.config.srv.WindidConfigSet');
     $config = new WindidConfigSet('attachment');
     $config->set('ftp.url', $this->getInput('ftpUrl', 'post'))->set('ftp.server', $this->getInput('ftpServer', 'post'))->set('ftp.port', $this->getInput('ftpPort', 'post'))->set('ftp.dir', $this->getInput('ftpDir', 'post'))->set('ftp.user', $this->getInput('ftpUser', 'post'))->set('ftp.pwd', $this->getInput('ftpPwd', 'post'))->set('ftp.timeout', abs(intval($this->getInput('ftpTimeout', 'post'))))->flush();
     $this->showMessage('WINDID:success');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:10,代码来源:StorageController.php


示例11: setStore

 public function setStore($key, $storage)
 {
     Wind::import('WINDID:service.config.srv.WindidConfigSet');
     $config = new WindidConfigSet('storage');
     $config->set($key, serialize($storage))->flush();
     return true;
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:WindidStoreService.php


示例12: getAppOutPut

 public static function getAppOutPut($collect)
 {
     $data = array();
     $sign = ACloudSysCoreCommon::getSiteSign();
     $data['src'] = $collect->getSrc();
     $data['url'] = ACloudSysCoreCommon::getGlobal('g_siteurl', $_SERVER['SERVER_NAME']);
     $data['sn'] = ACloudSysCoreCommon::getSiteUnique();
     $data['fid'] = $collect->getFid();
     $data['uid'] = $collect->getUid();
     $data['tid'] = $collect->getTid();
     $data[$sign] = ACloudVerCoreApp::getSyncData($sign);
     $data['charset'] = ACloudSysCoreCommon::getGlobal('g_charset', 'gbk');
     $data['username'] = $collect->getUsername();
     $data['title'] = $collect->getTitle();
     $data['_ua'] = ACloudSysCoreCommon::getSiteUserAgent();
     $data['_shr'] = base64_encode(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');
     $data['_sqs'] = base64_encode(isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');
     $data['_ssn'] = base64_encode(isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : '');
     $data['_t'] = ACloudSysCoreCommon::getGlobal('timestamp') + 86400;
     $data['_v'] = rand(1000, 9999);
     require_once Wind::getRealPath("ACLOUD:system.core.ACloudSysCoreHttp");
     $url = sprintf("http://%s/?%s", ACloudSysCoreDefine::ACLOUD_HOST_APP, ACloudSysCoreHttp::httpBuildQuery($data));
     $output = "<script type=\"text/javascript\">(function(d,t){var url=\"{$url}\";var g=d.createElement(t);g.async=1;g.src=url;d.body.insertBefore(g,d.body.firstChild);}(document,\"script\"));</script>";
     return $output;
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:25,代码来源:ACloudVerCoreApp.php


示例13: checkVerify

 public function checkVerify($inputCode)
 {
     Wind::import('WINDID:service.verify.srv.PwVerifyService');
     $srv = new PwVerifyService('PwVerifyService_getVerifyType');
     $config = Wekit::C('verify');
     return $srv->checkVerify($config['type'], $inputCode);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:PwCheckVerifyService.php


示例14: 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


示例15: getType

 /**
  * 根据请求的mime类型获得返回内容类型
  *
  * @param string $mime mime类型
  * @return string
  */
 public static function getType($mime)
 {
     if (self::$mimes === null) {
         self::$mimes = @(include Wind::getRealPath('WIND:http.mime.mime.php', true));
     }
     return array_search($mime, self::$mimes);
 }
开发者ID:ccq18,项目名称:EduSoho,代码行数:13,代码来源:WindMimeType.php


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


示例17: domodify

 public function domodify()
 {
     $verifiedWord = $this->getInput('verifiedWord');
     $tagnames = $this->getInput('tagnames');
     Wind::import('SRV:forum.srv.post.do.PwPostDoWord');
     return new PwPostDoWord($this->bp, $verifiedWord, $tagnames);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:PwPostDoWordInjector.php


示例18: emailAction

 /** 
  * 电子邮件用户激活
  */
 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');
     $seoBo = PwSeoBo::getInstance();
     $lang = Wind::getComponent('i18n');
     $seoBo->setCustomSeo($lang->getMessage('SEO:manage.user.email.title'), '', '');
     Wekit::setV('seo', $seoBo);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:31,代码来源:UserController.php


示例19: 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


示例20: getAudioAction

 /**
  * 获取语音验证码
  */
 public function getAudioAction()
 {
     Wind::import('LIB:utility.PwVerifyCode');
     $srv = new PwVerifyCode();
     $srv->getAudioVerify();
     exit;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:10,代码来源:IndexController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP WindFile类代码示例发布时间:2022-05-23
下一篇:
PHP WikiaSpecialPageController类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap