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

PHP UrlUtil类代码示例

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

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



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

示例1: comp

 /**
  * 登録完了
  */
 public function comp()
 {
     $ctl = $this;
     $url = UrlUtil::getAccountList();
     //$ctl->redirect($url);
     $this->redirect($url);
 }
开发者ID:Shiro-Nwal,项目名称:sin-kaisha-khine,代码行数:10,代码来源:UserCreatesController.php


示例2: browseResults

	    public function browseResults ()
	    {
            $this->q = trim ($_GET['q']);
            $this->searchType = htmlentities ($_GET['type']);
            $this->searchOptions = $this->getSearchOptions ();
            if (! empty ($this->cities)) $this->searchOptions->cities = $this->cities;
            $this->sort = htmlentities ($_REQUEST['sort']);
            $this->setupPerf ();
            $this->getSearchResults ();
            
            $this->result = $this->findResult ($this->permalink);
            
            if (! empty ($this->result))
            {
                $this->setupMeta ();
                $this->render ('browseFrame.php');
            }
            else
            {
                if ($this->searchOptions->type)
                {
                    UrlUtil::redirect ('/'
                                . urlencode ($this->searchOptions->type)
                                . '?q='
                                . urlencode ($this->searchOptions->q)
                                . '&e=1', ($_GET['p'] && ! $permaLinkOK));
                    exit;
                }
                else
                {
                    $this->render404 ();
                }
            }
	    }
开发者ID:phatduckk,项目名称:craigslittlebuddy.com,代码行数:34,代码来源:BrowseResultsAction.php


示例3: getSubmitUrl

 private static function getSubmitUrl($module, $action, $view)
 {
     $url = $view->get('fields@url');
     if (!$url) {
         $url = sfContext::getInstance()->getController()->genUrl("{$module}/{$action}");
     }
     return UrlUtil::abs($url);
 }
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:8,代码来源:afEditJsonRenderer.class.php


示例4: message

 public function message($message, $returnBack = '')
 {
     if ($returnBack) {
         $returnBack = UrlUtil::createUrl($returnBack);
     }
     $this->view('message', array('message' => $message, 'returnBack' => $returnBack));
     $this->output->_display();
     exit;
 }
开发者ID:guohao214,项目名称:xinya,代码行数:9,代码来源:BaseController.php


示例5: index

 /**
  * 展示店铺
  */
 public function index()
 {
     $returnUrl = $this->input->get('returnUrl', true);
     if ($returnUrl) {
         $returnUrl = urldecode($returnUrl);
     }
     if (!$returnUrl || !UrlUtil::isValidUrl($returnUrl)) {
         $returnUrl = UrlUtil::createUrl('project/index');
     }
     $this->outputCache();
     $shops = (new ShopModel())->allShops();
     $this->view('shop/index', array('shops' => $shops, 'returnUrl' => $returnUrl));
 }
开发者ID:guohao214,项目名称:xinya,代码行数:16,代码来源:Shop.php


示例6: redirect

 public function redirect($url, $terminate = true, $statusCode = 302)
 {
     if (Yii::app()->isMobileApp()) {
         $params = array();
         if (isset($_GET['x2ajax'])) {
             $params['x2ajax'] = $_GET['x2ajax'];
         }
         if (isset($_GET['isMobileApp'])) {
             $params['isMobileApp'] = $_GET['isMobileApp'];
         }
         $url = UrlUtil::mergeParams($url, $params);
     }
     return parent::redirect($url, $terminate, $statusCode);
 }
开发者ID:tymiles003,项目名称:X2CRM,代码行数:14,代码来源:X2HttpRequest.php


示例7: getFormConfig

 /**
  * Returns a valid af_formcfg for this form or null.
  */
 private static function getFormConfig($context)
 {
     $request = $context->getRequest();
     $encoded = $request->getParameter('af_formcfg');
     $formcfg = afAuthenticDatamaker::decode($encoded);
     if ($formcfg === null) {
         return null;
     }
     $uri = $context->getRequest()->getUri();
     if (UrlUtil::getPathPart($formcfg['url']) !== UrlUtil::getPathPart($uri)) {
         // The given formcfg is for a different form.
         return null;
     }
     return $formcfg;
 }
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:18,代码来源:XmlParserValidationFilter.class.php


示例8: index

 public function index($content_id)
 {
     $ctl = $this;
     $model = $ctl->CategoriesDelete;
     $session = $ctl->Session;
     $request = $ctl->request;
     $flashMessage = __('事業目的の削除に失敗しました');
     if ($request->is('post')) {
         if ($model->deleteContent($content_id)) {
             $flashMessage = __('事業目的の削除が完了しました');
         }
     }
     $session->setFlash($flashMessage);
     $url = UrlUtil::getCategoriesSearch();
     $ctl->redirect($url);
 }
开发者ID:Shiro-Nwal,项目名称:sin-kaisha-khine,代码行数:16,代码来源:CategoriesDeletesController.php


示例9: index

 public function index($tbl_user_id)
 {
     $ctl = $this;
     $model = $ctl->UserDelete;
     $request = $ctl->request;
     $session = $ctl->Session;
     $flashMessage = __('アカウント情報の削除に失敗しました');
     if ($request->is('post')) {
         if ($model->deleteUser($tbl_user_id)) {
             $flashMessage = __('アカウント情報の削除が完了しました');
         }
     }
     $session->setFlash($flashMessage);
     $url = UrlUtil::getAccountList();
     $this->redirect($url);
 }
开发者ID:Shiro-Nwal,项目名称:sin-kaisha-khine,代码行数:16,代码来源:UserDeletesController.php


示例10: index

 /**
  * 展示预约页面
  * 选择美容师与预约时间
  * 此处要验证授权
  *
  * @param $shopId 店铺ID
  */
 public function index($shopId)
 {
     $weixinUtil = new WeixinUtil();
     // 验证是否已授权
     $weixinUtil->authorize("appointment/index/{$shopId}");
     // 获得预约项目
     $projectId = (new CartUtil())->cart();
     $projectId += 0;
     if (!$projectId) {
         $this->message('预约项目不存在!');
     }
     $openId = $weixinUtil->getOpenId();
     if ((new ProjectPropertyModel())->projectOnlyForNewUser($projectId, $openId)) {
         $this->message('此美容项目只针对新用户!');
     }
     //是否已经选择了店铺,并且店铺是有效的
     $shops = (new ShopModel())->getAllShops();
     if (is_numeric($shopId) && array_key_exists($shopId, $shops)) {
         // 获得项目信息
         $project = (new ProjectModel())->readOne($projectId);
         if (!$project) {
             $this->message('预约项目不存在!');
         }
         // 跳转到 选择 美容师
         $beauticians = (new BeauticianModel())->getAllBeauticians();
         $lastOrder = (new OrderModel())->getLastOrder($openId);
         $days = DateUtil::buildDays();
         $coupons = array();
         if ($project['can_use_coupon']) {
             // 查询优惠券
             $coupons = (new CustomerCouponModel())->getCustomerNotUseCouponList($openId);
         }
         $this->load->view('frontend/appointment/beautician', array('beauticians' => $beauticians, 'project' => $project, 'shopId' => $shopId, 'days' => $days, 'lastOrder' => $lastOrder, 'coupons' => $coupons));
     } else {
         // 跳转到选择店铺
         $returnUrl = urlencode(UrlUtil::createUrl('appointment/index'));
         ResponseUtil::redirect(UrlUtil::createUrl("shop/index?returnUrl={$returnUrl}"));
     }
 }
开发者ID:guohao214,项目名称:xinya,代码行数:46,代码来源:Appointment.php


示例11: input

 public function input($content_id)
 {
     $ctl = $this;
     $model = $ctl->CategoriesEdit;
     $session = $ctl->Session;
     $request = $ctl->request;
     $sessionKey = $model->getSessionKey($content_id);
     $model->setInputFormParams();
     $model->setSessionToRequestData($request, $session, $sessionKey);
     if ($request->is('post')) {
         if (!empty($request->data) && $model->saveCategory($request->data)) {
             $model->deleteRequestSessionData($session, $sessionKey);
             $session->setFlash(__('事業目的情報を更新しました'));
             $url = UrlUtil::getCategoriesSearch();
             $this->redirect($url);
             return;
         } else {
             $session->setFlash(__('事業目的情報の更新に失敗しました'));
             $ctl->setAction('input', true);
             return;
         }
     }
 }
开发者ID:Shiro-Nwal,项目名称:sin-kaisha-khine,代码行数:23,代码来源:CategoriesEditsController.php


示例12: __construct

 public function __construct()
 {
     parent::__construct();
     if (!UserUtil::getUserId()) {
         ResponseUtil::redirect(UrlUtil::createBackendUrl('login'));
     }
     $controller = strtolower($this->router->class);
     $method = strtolower($this->router->method);
     if (UserUtil::isShopKeeper()) {
         if (!array_key_exists($controller, $this->shopKeeperPermissions)) {
             $this->message('你没有权限执行本步骤!');
         }
         $methods = $this->shopKeeperPermissions[$controller];
         if ($methods == '*') {
             return true;
         } else {
             if (!in_array($method, $methods)) {
                 $this->message('你没有权限执行本步骤!');
             } else {
                 return true;
             }
         }
     }
 }
开发者ID:guohao214,项目名称:xinya,代码行数:24,代码来源:BackendController.php


示例13: nl2br

    ?>
</p>
            </div>
        <?php 
}
?>

        <div class="item_desc">
            <ul class="tags">
                <li class="F15 project_effect">功效</li>
            </ul>
            <p><?php 
echo nl2br($project['effects']);
?>
</p>
        </div>
    </div>
</section>
<footer>
    <a class="project_footer F18" data-id="<?php 
echo $project['project_id'];
?>
"
       href="<?php 
echo UrlUtil::createUrl("appointment/index/{$shopId}");
?>
">预约</a>
</footer>

</body>
</html>
开发者ID:guohao214,项目名称:xinya,代码行数:31,代码来源:detail.php


示例14: set_value

                <th><i class="require-red">*</i>过期时间:</th>
                <td>
                    <input class="common-text required" name="expire_time"
                           value="<?php 
echo set_value('expire_time');
?>
" size="20" type="text">
                </td>
            </tr>

            <tr>
                <th></th>
                <td>
                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                    <a class="btn btn6" href="<?php 
echo UrlUtil::createBackendUrl('coupon/index');
?>
">返回</a>
                </td>
            </tr>
            </tbody>
        </table>
        </form>
    </div>

    <script>
        $(document).ready(function() {
            $('[name="expire_time"], [name="start_time"]').datetimepicker({
                lang:'ch',
                timepicker:false,
                format:'Y-m-d',
开发者ID:guohao214,项目名称:xinya,代码行数:31,代码来源:addCoupon.php


示例15: goto

	    public function goto ()
	    {
            $this->searchType = $_GET['section'];
            $this->q = trim ($_GET['q']);
            $this->searchOptions = $this->getSearchOptions ();
            $this->sort = $_REQUEST['sort'];
            $this->setupPerf ();
            $this->getSearchResults ();
            
            $numToSkip = 0;
            foreach ($this->countByDomain as $k => $v)
            {
                if ($k == $_GET['city']) break;
                $numToSkip += $v;                            
            }
            
            $page = (floor ($numToSkip / self::RESULTS_PER_PAGE)) + 1;
            $url = "/{$this->searchType}?q=" . urlencode ($this->q) . "&sort=" . self::SORT_CITY . (($page != 1) ? "&page={$page}" : '' ) ."#{$_GET['city']}";
            UrlUtil::redirect ($url);
	    }
开发者ID:phatduckk,项目名称:craigslittlebuddy.com,代码行数:20,代码来源:SearchAction.php


示例16:

            ?>
">
                            </div>
                            <p class="in-mu-title xac fss"><?php 
            echo $menu['name'];
            ?>
</p>
                        </div>
                    <?php 
        } else {
            ?>
                        <div class="in-menu-item" data-mod="<?php 
            echo $menu['id'];
            ?>
" data-href="<?php 
            echo UrlUtil::getUrl($menu['url']);
            ?>
" data-title="<?php 
            echo $menu['name'];
            ?>
"
                             data-desc="<?php 
            echo $menu['description'];
            ?>
" data-src="<?php 
            echo 'data/icon/' . $menu['icon'];
            ?>
">
                            <a href="javascript:;" class="o-mu-plus" data-action="addToCommonMenu"></a>
                            <a href="javascript:;" class="o-mu-minus" data-action="removeFromCommonMenu"></a>
                            <div title="<?php 
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:index.php


示例17:

        echo $coupon['expire_time'];
        ?>
</td>
                        <td><?php 
        echo $coupon['create_time'];
        ?>
</td>
                        <td>
                            <a class="link-update btn btn-warning"
                               href="<?php 
        echo UrlUtil::createBackendUrl('coupon/updateCoupon/' . $coupon['coupon_id'] . "/{$limit}");
        ?>
">修改</a>
                            <a class="link-del btn btn-danger"
                               href="<?php 
        echo UrlUtil::createBackendUrl('coupon/deleteCoupon/' . $coupon['coupon_id'] . "/{$limit}");
        ?>
">删除</a>
                        </td>
                    </tr>
                <?php 
    }
    ?>
            </table>
            <div class="list-page"><?php 
    echo $pages;
    ?>
</div>
        <?php 
} else {
    ?>
开发者ID:guohao214,项目名称:xinya,代码行数:31,代码来源:index.php


示例18:

                <th><i class="require-red">*</i>过期时间:</th>
                <td>
                    <input class="common-text required" name="expire_time"
                           value="<?php 
echo $exchangeGoods['expire_time'];
?>
" size="20" type="text">
                </td>
            </tr>

            <tr>
                <th></th>
                <td>
                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                    <a class="btn btn6" href="<?php 
echo UrlUtil::createBackendUrl('exchangeGoods/index');
?>
">返回</a>
                </td>
            </tr>
            </tbody>
        </table>
        </form>
    </div>

    <script>
        $(document).ready(function() {
            $('[name="expire_time"], [name="start_time"]').datetimepicker({
                lang:'ch',
                timepicker:false,
                format:'Y-m-d',
开发者ID:guohao214,项目名称:xinya,代码行数:31,代码来源:updateExchangeGoods.php


示例19: foreach

								<?php 
        if (!empty($nav['child'])) {
            ?>
									<ul class="subnv" id="sub_nav_<?php 
            echo $index;
            ?>
">
										<?php 
            foreach ($nav['child'] as $subNav) {
                ?>
											<?php 
                if ($subNav['disabled']) {
                    continue;
                }
                $hasPurv = UserUtil::checkNavPurv($subNav);
                $subNav['url'] = UrlUtil::getUrl($subNav['url']);
                ?>
											<?php 
                if ($hasPurv) {
                    ?>
												<li><a target="<?php 
                    echo $subNav['targetnew'] ? '_blank' : '_self';
                    ?>
" href="<?php 
                    echo $subNav['url'];
                    ?>
"><?php 
                    echo $subNav['name'];
                    ?>
</a></li>
											<?php 
开发者ID:AxelPanda,项目名称:ibos,代码行数:31,代码来源:subfield.php


示例20: addRowAction

 /**
  * Adds a row action if all its params are defined on the row.
  */
 private static function addRowAction(&$row, $url, $params, $actionNumber)
 {
     $urlParams = array();
     foreach ($params as $param) {
         if (!isset($row[$param])) {
             return;
         }
         $urlParams[$param] = $row[$param];
     }
     $rowurl = UrlUtil::addParams($url, $urlParams);
     $row['action' . $actionNumber] = $rowurl;
 }
开发者ID:cbsistem,项目名称:appflower_engine,代码行数:15,代码来源:afListRenderer.class.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP User类代码示例发布时间:2022-05-23
下一篇:
PHP UrlManager类代码示例发布时间: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