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


PHP WindUrlHelper::createUrl方法代码示例

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


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

示例1: beforeAction

 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     if (!$this->loginUser->isExists()) {
         $this->forwardAction('u/login/run', array('backurl' => WindUrlHelper::createUrl('my/article/run')));
     }
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:7,代码来源:ArticleController.php

示例2: beforeAction

 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     if (!$this->loginUser->isExists()) {
         $this->forwardRedirect(WindUrlHelper::createUrl('u/login/run', array('_type' => $this->getInput('_type'))));
     }
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:ExtendsController.php

示例3: showError

 /**
  * 显示错误
  * 
  * @param array $error array('',array())
  */
 protected function showError($error = '', $referer = '', $refresh = false)
 {
     $referer && ($referer = WindUrlHelper::createUrl($referer));
     $this->addMessage($referer, 'referer');
     $this->addMessage($refresh, 'refresh');
     parent::showMessage($error);
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:12,代码来源:AdminBaseController.php

示例4: getData

 protected function getData($field, $order, $limit, $offset)
 {
     Wind::import('SRV:tag.vo.PwTagSo');
     $so = new PwTagSo();
     $field['tag_ids'] && $so->setTagId(explode(' ', $field['tag_ids']));
     $field['category_id'] && $so->setCategoryId($field['category_id']);
     $so->setIflogo($field['islogo']);
     $so->setIfhot(1);
     switch ($field['order']) {
         case 0:
             $so->orderbyCreatedTime();
             break;
         case 1:
             $so->orderbyAttentionCount();
             break;
         case 2:
             $so->orderbyContentCount();
             break;
     }
     $list = Wekit::load('tag.PwTagSearch')->searchTag($so, $limit, $offset);
     if (!$list) {
         return array();
     }
     foreach ($list as $k => $v) {
         $list[$k]['tagid'] = $v['tag_id'];
         $list[$k]['tag_name'] = $this->_formatTitle($v['tag_name']);
         $list[$k]['url'] = WindUrlHelper::createUrl('tag/index/view', array('name' => $v['tag_name']), '', 'pw');
         $list[$k]['logo'] = Pw::getPath($v['tag_logo']);
         $list[$k]['attention_count'] = $v['attention_count'];
         $list[$k]['content_count'] = $v['content_count'];
         $list[$k]['excerpt'] = $v['excerpt'];
         $list[$k]['thumb_attach'] = $v['tag_logo'] ? $v['tag_logo'] : '';
     }
     return $list;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:35,代码来源:PwDesignTagDataService.php

示例5: __construct

 public function __construct()
 {
     $config = Wekit::C('pay');
     $this->tenpay = $config['tenpay'];
     $this->tenpay_key = $config['tenpaykey'];
     $this->baseurl = WindUrlHelper::createUrl('bbs/tenpay/run');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:PwTenpay.php

示例6: doSaveInformationAction

 public function doSaveInformationAction()
 {
     list($openid, $id, $key) = $this->getInput(array('openid', 'pid', 'key'));
     $this->setOutput($openid, 'openId');
     if (!isset($_SESSION)) {
         @session_start();
     }
     $_SESSION['exchangekey'] = $key;
     //user validation
     $userMoney = $this->getUserMoneyByOpenId($openid);
     if (empty($userMoney) == false && isset($_SESSION['exchangekey'])) {
         $prize = $this->_getCommonDs()->getPrizeById($id);
         //check user money
         if (empty($prize) == false && $prize['dmoney'] <= $userMoney['money']) {
             $deductDMoeny = 0 - $prize['dmoney'];
             $isDeduct = $this->_getMyMoneyDS()->updateMyMoney($userMoney['userid'], $deductDMoeny, 0, $prize['name']);
             if ($isDeduct > 0) {
                 unset($_SESSION['exchangekey']);
                 $this->setOutput($isDeduct, "isDeduct");
             }
             $myMoney = $this->_getMyMoneyDS()->getMyMoney($userMoney['userid']);
             $this->setOutput($myMoney[0], 'myMoney');
             $this->setOutput($prize, "prize");
             list($pid, $receiveContactor, $receivePhone, $receiveQQ, $receiveAddress) = $this->getInput(array('pid', 'receiveContactor', 'receivePhone', 'receiveQQ', 'receiveAddress'));
             $dm = new App_Giftexchange_Dm();
             $dm->setUserId($userMoney['userid'])->setContact($receiveContactor)->setPhoneNumber($receivePhone)->setqq($receiveQQ)->setAddress($receiveAddress)->setProductId($prize['id'])->setCreateTime(Pw::getTime());
             $saveInfo = $this->_getGiftexchangeDS()->add($dm);
             $this->setOutput($saveInfo, 'saveInfo');
         }
     } else {
         $url = WindUrlHelper::createUrl('app/4tmobile/mobilemymoney/run', array('openid' => $openid));
         $this->forwardRedirect($url);
     }
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:34,代码来源:MobilereceiveinformationController.php

示例7: __construct

 public function __construct()
 {
     $config = Wekit::C('pay');
     $this->bill = $config['99bill'];
     $this->bill_key = $config['99billkey'];
     $this->baseurl = WindUrlHelper::createUrl('bbs/pay99bill/run');
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:PwBill.php

示例8: beforeAction

 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     if (empty($this->schoolExtra) == false && $this->schoolExtra['openliuyanban'] == 0) {
         $this->forwardRedirect(WindUrlHelper::createUrl('app/4tschool/notopen/run'));
     }
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:7,代码来源:MyfeedbackController.php

示例9: beforeAction

 public function beforeAction($handlerAdapter)
 {
     parent::beforeAction($handlerAdapter);
     if ($this->loginUser->uid < 1) {
         $this->forwardRedirect(WindUrlHelper::createUrl('u/login/run/'));
     }
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:7,代码来源:SourceController.php

示例10: appDo

 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>&nbsp;<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>';
 }
开发者ID:Going2333,项目名称:WindPT,代码行数:32,代码来源:PwSpaceProfileDoTorrent.php

示例11: run

 public function run()
 {
     $page = (int) $this->getInput('page', 'get');
     $perpage = 10;
     $args = array();
     $page = $page > 1 ? $page : 1;
     list($start, $perpage) = Pw::page2limit($page, $perpage);
     $list = $this->_getPageDs()->getPageList(PwDesignPage::SYSTEM, $start, $perpage);
     $count = $this->_getPageDs()->countPage(PwDesignPage::SYSTEM);
     $sysPage = Wekit::load('design.srv.router.PwDesignRouter')->get();
     foreach ($list as &$v) {
         if (isset($sysPage[$v['page_router']])) {
             list($pagename, $unique) = $sysPage[$v['page_router']];
         }
         list($m, $c, $a, $id) = explode('|', $v['page_router']);
         if ($unique) {
             $v['url'] = WindUrlHelper::createUrl($m . '/' . $c . '/' . $a, array($unique => $v['page_unique']), '', 'pw');
         } else {
             $v['url'] = WindUrlHelper::createUrl($m . '/' . $c . '/' . $a, array(), '', 'pw');
         }
         $sep = strpos($v['url'], '?') === false ? '?' : '&';
         $v['designurl'] = $v['url'] . $sep . 'design=1';
     }
     $this->setOutput($list, 'list');
     $this->setOutput($count, 'count');
     $this->setOutput($page, 'page');
     $this->setOutput($perpage, 'perpage');
     $this->setOutput(ceil($count / $perpage), 'totalpage');
     $this->setOutput('design/page/run', 'pageurl');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:30,代码来源:PageController.php

示例12: beforeAction

 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)));
     }
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:32,代码来源:BanController.php

示例13: buildTitle

 public function buildTitle($param = 0, $extendParams = null, $aggregatedNotice = null)
 {
     $params = array();
     $msg = '';
     switch ($extendParams['change_type']) {
         //转账
         case 'transfer':
             $params['{username}'] = '<a href="' . WindUrlHelper::createUrl('space/index/run', array('uid' => $extendParams['fromUid'])) . '">' . $extendParams['fromUserName'] . '</a>';
             $params['{num}'] = $extendParams['num'];
             $params['{unit}'] = $extendParams['unit'];
             $params['{credit}'] = $extendParams['credit'];
             $msg = 'CREDIT:transfer.to.notice.format';
             break;
             //转换:
         //转换:
         case 'exchange':
             $params['{credit1}'] = $extendParams['credit1'];
             $params['{num1}'] = $extendParams['num1'];
             $params['{unit1}'] = $extendParams['unit1'];
             $params['{credit2}'] = $extendParams['credit2'];
             $params['{num2}'] = $extendParams['num2'];
             $params['{unit2}'] = $extendParams['unit2'];
             $msg = 'CREDIT:exchange.notice.format';
             break;
         case 'pay':
             $params['{credit}'] = $extendParams['credit'];
             $params['{num}'] = $extendParams['num'];
             $params['{unit}'] = $extendParams['unit'];
             $params['{price}'] = $extendParams['price'];
             $msg = 'CREDIT:pay.notice.format';
             break;
     }
     return Wind::getComponent('i18n')->getMessage($msg, $params);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:34,代码来源:PwNoticeCredit.php

示例14: _buildSignKey

 private function _buildSignKey($list)
 {
     $_username = array();
     $_tids = array();
     foreach ($list as $k => $v) {
         $_tids[] = $v['lastpost_tid'];
     }
     $thread = $this->_getThread($_tids);
     foreach ($list as $k => $v) {
         $list[$k]['name'] = $this->_filterForumHtml($v['name']);
         if ($v['type'] == 'category') {
             $list[$k]['forum_url'] = WindUrlHelper::createUrl('bbs/cate/run', array('fid' => $v['fid']), '', 'pw');
         } else {
             $list[$k]['forum_url'] = WindUrlHelper::createUrl('bbs/thread/run', array('fid' => $v['fid']), '', 'pw');
         }
         $list[$k]['descrip'] = $this->_formatDes($v['descrip']);
         $list[$k]['logo'] = $v['logo'] ? Pw::getPath($v['logo']) : '';
         $lastthread = $thread[$v['lastpost_tid']];
         $list[$k]['lastpost_time'] = $this->_formatTime($lastthread['lastpost_time']);
         $list[$k]['lastpost_smallavatar'] = $lastthread['lastpost_userid'] ? Pw::getAvatar($lastthread['lastpost_userid'], 'small') : '';
         $list[$k]['lastpost_middleavatar'] = $lastthread['lastpost_userid'] ? Pw::getAvatar($lastthread['lastpost_userid'], 'middle') : '';
         $list[$k]['lastpost_userid'] = $lastthread['lastpost_userid'];
         $list[$k]['lastpost_username'] = $lastthread['lastpost_username'];
         $list[$k]['lastpost_space'] = $lastthread['lastpost_userid'] ? WindUrlHelper::createUrl('space/index/run', array('uid' => $lastthread['lastpost_userid']), '', 'pw') : '';
         $list[$k]['lastthread_space'] = $lastthread['created_userid'] ? WindUrlHelper::createUrl('space/index/run', array('uid' => $lastthread['created_userid']), '', 'pw') : '';
         $list[$k]['lastthread_smallavatar'] = $lastthread['created_userid'] ? Pw::getAvatar($lastthread['created_userid'], 'small') : '';
         $list[$k]['lastthread_middleavatar'] = $lastthread['created_userid'] ? Pw::getAvatar($lastthread['created_userid'], 'middle') : '';
         $list[$k]['lastthread_username'] = $lastthread['created_username'];
         $list[$k]['lastthread_time'] = $this->_formatTime($lastthread['created_time']);
         $list[$k]['lastthread'] = $this->_formatTitle($lastthread['subject']);
     }
     return $list;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:33,代码来源:PwDesignForumDataService.php

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


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