Example #1
0
         $sqlStr = "update qiyu_useraddr set useraddr_phone='" . $tel . "' where useraddr_user="******" and useraddr_type='0'";
         mysql_query($sqlStr);
         echo "S";
     } else {
         echo "E";
     }
     break;
 case "addAddress":
     //添加新地址
     $phone = sqlReplace(trim($_POST['phone']));
     $name = sqlReplace(trim($_POST['name']));
     $area = sqlReplace(trim($_POST['area']));
     $circle = sqlReplace(trim($_POST['circle']));
     $spot = sqlReplace(trim($_POST['spot']));
     $address = sqlReplace(trim($_POST['address']));
     $nameList = getCircleBySpot($spot);
     $addressAll = $nameList['area_name'] . $nameList['circle_name'] . $nameList['spot_name'] . $address;
     $address_sql = "insert into qiyu_useraddr(useraddr_user,useraddr_phone,useraddr_area,useraddr_spot,useraddr_circle,useraddr_address,useraddr_name,useraddr_totaladdr) values (" . $QIYU_ID_USER . ",'" . $phone . "'," . $area . "," . $spot . "," . $circle . ",'" . $address . "','" . $name . "','" . $addressAll . "')";
     mysql_query($address_sql);
     $id = mysql_insert_id();
     echo "<div class='haveAddress'>";
     echo "<p class='title'>您已经有的地址:</p>";
     $sql = "select * from qiyu_useraddr where useraddr_user="******" and useraddr_spot=" . $spot . " order by useraddr_id desc";
     $rs = mysql_query($sql);
     $i = 1;
     while ($rows = mysql_fetch_assoc($rs)) {
         if ($i == '1') {
             $str = "checked";
         } else {
             $str = "";
         }
Example #2
0
} else {
    $_SESSION['qiyu_orderDesc'] = $orderDesc;
}
if (empty($QIYU_ID_USER)) {
    Header("Location: userlogin.php?p=order&shopID=" . $shopID . "&shopSpot=" . $shopSpot . "&shopCircle=" . $shopCircle);
    exit;
}
if (!empty($time2)) {
    $time_now = time();
    $time_0_str = strtotime($time1 . ' ' . $time2 . ':00');
    if ($time_now > $time_0_str) {
        alertInfo("亲,预约时间不能晚于现在时间", "", 1);
    }
}
if (!empty($shopSpot)) {
    $areaArray = getCircleBySpot($shopSpot);
}
$_SESSION['login_url'] = getUrl();
$POSITION_HEADER = "提交订单";
$sql = "select * from qiyu_shop where shop_id=" . $shopID . " and shop_status='1'";
$rs = mysql_query($sql);
$rows = mysql_fetch_assoc($rs);
if ($rows) {
    $shop_name = $rows['shop_name'];
    $shop_id2 = $rows['shop_id2'];
    $payStr = explode("|", $rows['shop_pay']);
    $shop_pay = "|" . $rows['shop_pay'] . "|";
    $payCount = count($payStr);
    $shop_discount = $rows['shop_discount'];
} else {
    alertInfo("非法操作");