コード例 #1
0
     $query->receivers_query_sender_id($_GET["id"]);
 } else {
     if (isset($_GET["action"]) && $_GET["action"] == "save_receiver") {
         $query->receiver_insert($_GET['sender_id'], $_GET["receiver_name"], $_GET["receiver_phone"], $_GET["receiver_province"], $_GET["receiver_city"], $_GET["receiver_address"]);
     } else {
         if (isset($_GET["action"]) && $_GET["action"] == "update_receiver") {
             $query->receiver_update($_GET['receiver_id'], $_GET['sender_id'], $_GET["receiver_name"], $_GET["receiver_phone"], $_GET["receiver_province"], $_GET["receiver_city"], $_GET["receiver_address"]);
         } else {
             if (isset($_GET["action"]) && $_GET["action"] == "get_products") {
                 $query->products_query_search();
             } else {
                 $data = file_get_contents('php://input');
                 parse_str($data);
                 $txtReceiverAddress = stripslashes($txtReceiverAddress);
                 $hidTr = stripslashes($hidTr);
                 $result = $query->package_insert($hidDeliverID, $txtDeliverName, $txtDeliverMobilePhone, $hidReceiverID, $txtReceiverName, $txtReceiverMobilePhone, $dropSheng, $dropShi, $txtReceiverAddress, $hidTr, 0, 0, 0, $txtWeight, $txtSafeFree, $pkg_notes = '', $pkg_status = '0');
                 if ($result) {
                     $postData = array('__VIEWSTATE' => $add_view, 'dropRoute' => $dropRoute, 'txtDeliverName' => $txtDeliverName, 'txtDeliverMobilePhone' => $txtDeliverMobilePhone, 'txtReceiverName' => $txtReceiverName, 'txtReceiverMobilePhone' => $txtReceiverMobilePhone, 'dropSheng' => $dropSheng, 'dropShi' => $dropShi, 'hidShi' => $hidShi, 'txtReceiverAddress' => $txtReceiverAddress, 'hidTr' => $hidTr, 'txtWeight' => $txtWeight, 'txtSafeFree' => $txtSafeFree, 'txtNote' => '', 'btnTJ' => $button_add);
                     $ch = curl_init();
                     curl_setopt_array($ch, array(CURLOPT_URL => $add_url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $postData, CURLOPT_COOKIE => $cookie_login, CURLOPT_RETURNTRANSFER => 1));
                     $content = curl_exec($ch);
                     curl_close($ch);
                     $result_json['Result'] = "OK";
                     $result_json['Records'] = "";
                 } else {
                     $result_json['Result'] = "ERROR";
                     $result_json['Records'] = "";
                 }
                 echo json_encode($result_json);
             }
         }