/**
  * 登録完了
  */
 public function comp()
 {
     $ctl = $this;
     $url = UrlUtil::getAccountList();
     //$ctl->redirect($url);
     $this->redirect($url);
 }
	    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 ();
                }
            }
	    }
 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);
 }
Пример #4
0
 public function message($message, $returnBack = '')
 {
     if ($returnBack) {
         $returnBack = UrlUtil::createUrl($returnBack);
     }
     $this->view('message', array('message' => $message, 'returnBack' => $returnBack));
     $this->output->_display();
     exit;
 }
Пример #5
0
 /**
  * 展示店铺
  */
 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));
 }
Пример #6
0
 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);
 }
 /**
  * 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;
 }
 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);
 }
 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);
 }
Пример #10
0
 /**
  * 展示预约页面
  * 选择美容师与预约时间
  * 此处要验证授权
  *
  * @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}"));
     }
 }
 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;
         }
     }
 }
Пример #12
0
 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;
             }
         }
     }
 }
Пример #13
0
    ?>
</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>
Пример #14
0
                <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',
	    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);
	    }
Пример #16
0
            ?>
">
                            </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 
Пример #17
0
        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 {
    ?>
Пример #18
0
                <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',
Пример #19
0
								<?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 
 /**
  * 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;
 }
        case 'fondo':
            $tabla->get_ventas()->set_fondo_filter($_REQUEST['busqueda']);
            break;
        case 'condicion':
            $tabla->get_ventas()->set_condicion_filter($_REQUEST['busqueda']);
            break;
        case 'monto':
            $tabla->get_ventas()->set_monto_filter($_REQUEST['busqueda']);
            break;
        case 'saldo':
            $tabla->get_ventas()->set_saldo_filter($_REQUEST['busqueda']);
            break;
    }
}
if (isset($_REQUEST['orden']) && isset($_REQUEST['direccion'])) {
    $tabla->get_ventas()->set_order($_REQUEST['orden'], $_REQUEST['direccion']);
}
if (isset($_REQUEST['inicio']) && isset($_REQUEST['cantidad'])) {
    $tabla->get_ventas()->set_limit($_REQUEST['inicio'], $_REQUEST['cantidad']);
}
$tabla->iniciar_tabla('tabla-ventas');
$encabezado = new EncabezadoTabla();
$encabezado->show($campos);
$tabla->show();
$tabla->cerrar_tabla();
$paginador = new Paginador();
$paginador->set_total($tabla->get_count());
$paginador->set_interval($_REQUEST['cantidad']);
$url = new UrlUtil();
$paginador->set_url($url->get_uri());
$paginador->show();
Пример #22
0
<div class="crumb-wrap">
    <div class="crumb-list"><i class="icon-font"></i>
        <a href="<?php 
echo UrlUtil::createBackendUrl('project/index');
?>
">首页</a>
        <span class="crumb-step">&gt;</span><span>提示</span></div>
</div>
<div class="result-wrap">
    <div class="result-content">
        <div class="tips">
            <?php 
echo $message;
?>
            <br>
            <br>
            <?php 
if ($returnBack) {
    ?>
                <a class="btn btn6" href="<?php 
    echo $returnBack;
    ?>
">返回</a>
            <?php 
} else {
    ?>
                <input class="btn btn6" onClick="history.go(-1)" value="返回" type="button">
            <?php 
}
?>
        </div>
include_once 'include/campo.php';
include_once 'include/campo_oculto.php';
include_once 'include/campo_combo.php';
include_once 'include/campo_decimal.php';
include_once 'include/boton.php';
include_once 'include/boton_flat.php';
include_once 'include/table_handler.php';
include_once 'include/tabla.php';
include_once 'include/fondos/fondos.php';
include_once 'include/ventas/ventas.php';
include_once 'include/clientes/clientes.php';
include_once 'include/url_util.php';
include_once 'include/formatter.php';
$ventas = new Ventas();
$venta = $ventas->get_row($_REQUEST['codigo']);
$url = new UrlUtil();
$formulario = new Formulario();
$formulario->set_action_uri($url->get_uri() . '&action=grabar_pago');
$campo_codigo = new Campo('codigo', Formatter::code_format($venta[0]), 'Código de la operación', 'text');
$campo_codigo->set_disabled();
$campo_fecha = new Campo('fecha', Formatter::datetime_format($venta[2]), 'Fecha de emisión:', 'text');
$campo_fecha->set_disabled();
$clientes = new Clientes();
$campo_cliente = new CampoOculto('cliente', $venta[3]);
$campo_razon_cliente = new Campo('cliente', $clientes->get_field(1, $venta[3]), 'Cliente:', 'text');
$campo_razon_cliente->set_disabled();
$campo_monto_factura = new Campo('monto_fac', $venta[6], 'Monto de la factura:', 'text');
$campo_monto_factura->set_disabled();
$campo_saldo_factura = new Campo('saldo_fac', $venta[7], 'Saldo de la factura:', 'text');
$campo_saldo_factura->set_disabled();
$monto = '0';
Пример #24
0
if (!ActionUtil::invokeAction($urlInfo)) {
    // 	echo ("<hr/>如果你看到这一行提示,则说明没有被调度到ActionUtil : : numOfShellArgs(){}所注册的Action方法。<hr/>");
    // 	var_dump($urlInfo);
    /* 这里可再添加其它调度方式的代码【已被常规调度的有:0,1,3,4。剩余的参数状态有:2,5和 [没有注册shell或shell参数个数不符] 的状态3】。
     * 一般人没必要利用这个地方,你要是读懂了源代码,就任你用!
     * 本框架的设计者对源码很熟悉,所以就把这个分支用作普通模板输出啦!
     * 如果你输入的链接[ http://server.com/ItemName/?xxx=abc ]中的abc不是URL指令,
     * 而且还执行到此处的时候,系统就认定这个abc是用来访问abc.php这个页面的。
     * 本系统用于输出到客户端的页面默认存放于/PUBLIC_DIR_NAME/core/tpl/other/ 目录,要自定义存放位置,则需配置 [ 模板目录路径 OTHER_TEMPLATE_DIR  @  /core/lib/base/env__.php ]。
     * 以上输入的链接将默认访问到 /PUBLIC_DIR_NAME/core/tpl/other/abc.php 。
     * 以上得到的参数'abc'的取法:$urlInfo['params'][0]。取出该参数之前,要确保$urlInfo['params']非null,并且也要确保count($urlInfo['params'])非0,以及$urlInfo['params'][0]非null.
     * 接下来的就是页面[模板]输出的代码:
     */
    if (null != $urlInfo['params'] && 0 != count($urlInfo['params']) && null != $urlInfo['params'][0]) {
        $param = $urlInfo['params'][0];
        if (false === UrlUtil::isUrlShell($param)) {
            $param = trim(trim($param), '-/');
            $path = '';
            foreach (explode('-', $param) as $p) {
                $p = trim($p, '/ \\');
                if (strcmp('', $p)) {
                    $path .= '/' . $p;
                }
            }
            $path = trim($path, '/');
            /*包含的文件除了可以是abc.php之类的以外,也可以是abc/def/ghi.php之类的。
             * 只要请求的文件名参数能够被系统识别出a-b-c-d的格式,就可以默认访问到PUBLIC_DIR_NAME/core/tpl/a/b/c/d.php。
             * 这样的文件名参数格式,在本系统中称之为标准格式。其中的“-”将被替换为“/”。
             * 对于【'r_^-fds \\--/gh'】之类的文件名参数,本系统可以将之解析为【r_^/fds/gh】(原参数中,有“-”和“--”,于是结果就有两条“/”。至于原参数中的“\\”和“/”,将被清除)。
             * 这种掺入无关字符(“\”、“/”)的做法,可以起到障眼的作用,使文件路径不易被猜解。
             */
Пример #25
0
                        <td>
                            <?php 
        if ($order['order_status'] == OfflineOrderModel::ORDER_WAIT) {
            ?>
                            <a class="btn btn-info"
                               href="<?php 
            echo UrlUtil::createBackendUrl('offlineOrder/service/' . $order['offline_order_id']);
            ?>
">已服务</a>
                            <?php 
        }
        ?>

                            <a class="link-del btn btn-warning"
                               href="<?php 
        echo UrlUtil::createBackendUrl('offlineOrder/cancel/' . $order['offline_order_id']);
        ?>
">删除</a>
                        </td>
                    </tr>
                <?php 
    }
    ?>
            </table>
            <div class="list-page"><?php 
    echo $pages;
    ?>
</div>
        <?php 
} else {
    ?>
Пример #26
0
<header>
    <h2>订单支付(请在10分钟之内支付)</h2>
</header>

<input type="hidden" name="pay-params" value="<?php 
echo urlencode($payParams);
?>
">
<input type="hidden" name="pay-redirect-url" value="<?php 
echo UrlUtil::createUrl('userCenter/order');
?>
">

<section>
    <div class="order">
        <dl class="order_list">
            <dd>
                <div></div>
                <samp class="order_number">订单:<span class="F14">
                        <?php 
echo $order['order_no'];
?>
                    </span></samp>
            </dd>
            <dt>
            <div class="order_list_dtDiv">
                <a>
                    <img
                        src="<?php 
echo UploadUtil::buildUploadDocPath($order['project_cover'], '100x100');
?>
Пример #27
0
?>
"></a>
    <h2>积分兑换</h2>
</header>
<section>
    <div class="tab_wrap">
        <ul class="tabs j_scroll" id="iScroll0" style="">
            <li class="">
                <a href="<?php 
echo UrlUtil::createUrl("exchange/coupon");
?>
"><i></i>兑换优惠券</a>
            </li>
            <li class="current">
                <a href="<?php 
echo UrlUtil::createUrl("exchange/exchangeGoods");
?>
"><i></i>兑换商品</a>
            </li>
        </ul>
    </div>
    <?php 
if ($products) {
    ?>
        <?php 
    foreach ($products as $product) {
        ?>
            <div class="itemlist loaded">
                <div class="item ">
                    <dl>
                        <dt>
Пример #28
0
                        class="F18 colorR">¥</strong> <strong
                        class="F18 colorR totalAmount"><?php 
echo $totalAmount;
?>
</strong></i>
                <!--<P><samp class="colorH">支付状态:</samp>未支付</P>-->
            </dd>
        </dl>

    </div>
</section>


<div id="divMsg">
    <form action="<?php 
echo UrlUtil::createUrl('cart/order');
?>
" id="create-order" method="post">
        <div class="pay">
            <strong>
                <a id="aClose" href="javascript:; " onclick="document.body.id = ''; "></a>
                <span class="F16">完善信息</span>
            </strong>
            <ul>
                <li>
                    <samp>联系人:</samp>
                    <span><input type="text" name="user_name" class="order-text"></span>
                </li>
                <li>
                    <samp>手机号:</samp>
                    <span><input type="tel" name="phone" class="order-text"></span>
Пример #29
0
							<?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 
Пример #30
0
            <div class="itemlist loaded">
                <div class="title_index">
                    <span><p class="F16 FB <?php 
    echo 'category-list-' . $key;
    ?>
 "><?php 
    echo $categories[$key];
    ?>
</p></span>
                </div>
                <?php 
    foreach ($project as $pj) {
        ?>
                    <div class="item ">
                        <a href="<?php 
        echo UrlUtil::createUrl('project/detail/' . $pj['project_id'] . '/' . $shopId);
        ?>
">
                            <dl>
                                <dt>
                                    <img
                                        src="<?php 
        echo UploadUtil::buildUploadDocPath($pj['project_cover'], '100x100');
        ?>
">
                                </dt>
                                <dd>
                                    <h3><?php 
        echo $pj['project_name'];
        ?>
</h3>