Example #1
0
     $params = array(array($cid, SQLSRV_PARAM_IN), array($ndt, SQLSRV_PARAM_OUT));
     $rs = sp_execute("{call app_query_over_limit(?,?)}", $params);
     if (count($rs) > 0) {
         foreach ($rs as $row) {
             altermsg_for_overlimit($oid, $row["mname"], $row["amt"], $ndt);
         }
     }
     $status = "ok";
     $info = $tips;
     $_SESSION["haveCommitOrder"] = 1;
 } else {
     if ($action == "user_cuidan") {
         try {
             $oids = $_REQUEST["oids"];
             if (empty($_COOKIE["user_cuidan_time_{$oids}"])) {
                 $oid = str2num_x(orderid_content_x, $oids);
                 //用户催单,向餐厅管理员发送消息
                 altermsg_for_cuidan($oid);
                 //在cookie中设置催单时间变量5分钟
                 setcookie("user_cuidan_time_{$oids}", 1, time() + 300, "/");
                 $status = "ok";
                 $info = "成功";
             } else {
                 $status = "error";
                 $info = "您已催过单了,请耐心等待";
             }
         } catch (Exception $e) {
             $status = "error";
             $info = $e->getMessage();
         }
     } else {
Example #2
0
<body>
<div class="body1">
    <div class="container">
        <?php 
if ($_REQUEST["action"] == "onlyone") {
    echo '<div style="height:8px;"></div>';
    echo '<div class="headerCnameTips">' . $_SESSION["cname"] . '</div>';
}
?>
        <input type="hidden" id="uidex" value="<?php 
echo $_REQUEST["uid"];
?>
">
        <ul class="foodlist" style="padding-top:5px;">
            <?php 
$oid = str2num_x(orderid_content_x, $_REQUEST["oids"]);
$amount = 0.0;
$t_pay = 0.0;
$params = array(array($oid, SQLSRV_PARAM_IN), array($amount, SQLSRV_PARAM_OUT), array($t_pay, SQLSRV_PARAM_OUT));
$sp = "{call app_get_order_detail(?,?,?)}";
$rs = sp_execute($sp, $params);
foreach ($rs as $row) {
    echo '<li class="selected_food" id="li_food_' . $row["mid"] . '">';
    echo '<h3 class="tit" style="padding-left:10px;"><a href="javascript:;">' . $row["vname"] . '</a></h3>';
    echo '<div class="foodintro clearfix">';
    echo '<a href="javascript:;" class="foodimg floatl">';
    echo '<img src="' . (strlen($row["picurl"]) > 0 ? CFG_HTTP . CFG_MENU_PATH . $row["picurl"] : CFG_HTTP . CFG_MENU_DEFAULT) . '" alt="菜品图片">';
    echo '</a>';
    echo '<div class="foodcon floatl">';
    echo '<p class="price"><label>单价(元):</label><label>' . sprintf("%0.2f", $row["price"]) . '</label></p>';
    echo '<p class="num"><label>数量(' . $row["unit"] . '):</label><label>' . $row["amount"] . '</label></p>';
Example #3
0
 * Time: 15:33
 * Fun: 移动端页面管理员查看用户订单列表维护
 */
require_once "../config.php";
require_once "../conn.php";
require_once "../include/php_funs.php";
//
include_once "check_cookie_with_wid.php";
//
if (isset($_REQUEST["act"])) {
    $_SESSION["act"] = $_REQUEST["act"];
    if ($_REQUEST["act"] == 'precanteen') {
    } else {
        if ($_REQUEST["act"] == 'preoids' && isset($_REQUEST["cids"]) && isset($_REQUEST["oids"])) {
            $_SESSION["cid"] = str2num(canteenid_content, $_REQUEST["cids"]);
            $_SESSION["oid"] = str2num_x(orderid_content_x, $_REQUEST["oids"]);
        } else {
            if ($_REQUEST["act"] == 'preuids' && isset($_REQUEST["cids"]) && isset($_REQUEST["uids"])) {
                $_SESSION["cid"] = str2num(canteenid_content, $_REQUEST["cids"]);
                $_SESSION["uidx"] = str2num(userid_content, $_REQUEST["uids"]);
            } else {
                unset($_SESSION["act"]);
                echo 'unknow action' . $_REQUEST["act"];
                exit;
            }
        }
    }
} else {
    if (!isset($_SESSION["act"])) {
        echo '';
        exit;