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


PHP UrlUtil类代码示例

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


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


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