echo MES_Order::del_order_address($id); } else { if ($action == 'update_order_address') { //更新地址信息 $id = ANTI_SPAM($_POST['id'], array('minLength' => 1, 'maxLength' => 12, 'type' => 'number')); $contact = ANTI_SPAM($_POST['contact'], array('minLength' => 1, 'maxLength' => 100)); $country = ANTI_SPAM($_POST['country'], array('values' => array(441, 501))); $city = ANTI_SPAM($_POST['city'], array('minValue' => 543, 'maxValue' => 573, 'type' => 'number')); $address = ANTI_SPAM($_POST['address'], array('minLength' => 1, 'maxLength' => 200)); $district = ANTI_SPAM($_POST['district'], array('minValue' => 0, 'maxValue' => 20, 'type' => 'number', 'empty' => true)); $tel = ANTI_SPAM($_POST['tel'], array('minLength' => 5, 'maxLength' => 20)); echo MES_Order::update_order_address($id, $country, $city, $contact, $address, $tel, $district); } else { if ($action == 'get_region') { //获得二级区域的信息 echo MES_Order::get_region(); } else { if ($action == 'get_district') { $city = ANTI_SPAM($_GET['city'], array('minValue' => 543, 'maxValue' => 573, 'type' => 'number')); //获得送货的收费区信息 echo MES_Order::get_district($city); } else { if ($action == 'update_cart') { $id = ANTI_SPAM($_GET['id'], array('minLength' => 1, 'maxLength' => 12, 'type' => 'number')); //最多的订购需要限额 $num = ANTI_SPAM($_GET['num'], array('minValue' => 0, 'maxValue' => 99, 'type' => 'number')); echo MES_Order::update_cart($num, $id); } else { if ($action == 'drop_shopcart') { //删除购物车 $id = ANTI_SPAM($_GET['id'], array('minLength' => 1, 'maxLength' => 12, 'type' => 'number'));