Example #1
0
function getCacheKey($filterArr)
{
    if (empty($filterArr)) {
        return '';
    }
    if (!isset($filterArr['filters']) || !isset($filterArr['orders'])) {
        return '';
    }
    if (!is_array($filterArr['filters'])) {
        return '';
    }
    if (!is_array($filterArr['orders'])) {
        return '';
    }
    if (!isset($filterArr['cate3']) || $filterArr['cate3'] < 1) {
        return '';
    }
    $keysArr = array();
    $keysArr = getFilterKey($keysArr, $filterArr);
    $keysArr = getOrderKey($keysArr, $filterArr);
    return implode(":", $keysArr);
}
Example #2
0
            $sta = getOrderKey($id);
            if ($sta == '1') {
                alertInfo('取消失败,原因SQL出现异常', "userorder.php?key=1", 0);
            } else {
                alertInfo('取消失败,原因SQL出现异常', "userorder.php?key=0", 0);
            }
        }
    }
}
if ($act == "wc") {
    //完成订单
    $sql = "select * from qiyu_order where order_id=" . $id . " and order_status=1";
    $result = mysql_query($sql);
    $row = mysql_fetch_assoc($result);
    if (!$row) {
        $sta = getOrderKey($id);
        alertInfo('非法操作', "userorder.php?key={$sta}", 0);
    } else {
        $order = $row['order_id2'];
        $sql2 = "update qiyu_order set order_status='4'  where order_id=" . $id . " and order_status=1";
        if (mysql_query($sql2)) {
            //添加订单记录
            $orderContent = "<span class='greenbg'><span><span>订单已完成</span></span></span>";
            $orderContent .= "亲,享受美味的时候,别忘了继续光顾" . $SHOP_NAME . "哦,我们将更好的为您服务。";
            addOrderType($order, HTMLEncode($orderContent));
            alertInfo('订单完成!', '', 1);
        } else {
            alertInfo('设置完成失败,原因SQL出现异常', 'userorder.php?key=1', 0);
        }
    }
}