/home/desid573/public_html/test_api
NameSizeModeActions
lib/-0755rm
twilio-php-master/-0755rm
vendor/-0755rm
after_booking_page.php25950644editdlrm
booking.php107160644editdlrm
booking_28-04-2017.php9470644editdlrm
booking_29-04-2017.php37170644editdlrm
cancel_booking.php56210644editdlrm
checkPrice.php13060644editdlrm
composer.json650644editdlrm
composer.lock23550644editdlrm
confirmsend.php26820644editdlrm
contact_us_mail.php9030644editdlrm
dispatch.php8770644editdlrm
emailConfirmReset.php4860644editdlrm
error_log59222470644editdlrm
generate_credit.php31870644editdlrm
generate_referall.php27790644editdlrm
getuser_byid.php23410644editdlrm
getuser_bymail.php19680644editdlrm
get_all_booking.php7790644editdlrm
get_booking_bybooking_id.php8130644editdlrm
get_booking_byuser.php10570644editdlrm
get_booking_status.php22190644editdlrm
get_completed_bookings.php7270644editdlrm
get_directions.php8130644editdlrm
get_lead_message.php6730644editdlrm
get_open_bookings.php15270644editdlrm
get_payment_byuser.php10640644editdlrm
homekey_img.png140370644editdlrm
index.php142720644editdlrm
index_backup.php47910644editdlrm
lib_tr.zip1050470644editdlrm
login_api.php84050644editdlrm
login_api_old.php56530644editdlrm
noteconfirm.php92590644editdlrm
passwordResetLink.php51950644editdlrm
pay_file.php73020644editdlrm
pay_file_back.php53260644editdlrm
placehold.html21840644editdlrm
reset_email.php17550644editdlrm
send_bulk_notif.php16920644editdlrm
test_222.php8450644editdlrm
update_api.php63180644editdlrm
update_api_on_mail.php46770644editdlrm
validatecode.php10940644editdlrm
validatephone.php10340644editdlrm
Edit: /home/desid573/public_html/test_api/booking_29-04-2017.php (3717B)
query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $customer[] = $row; $sql = "SELECT * FROM `customer_details` where `cid` = '".$row["id"]."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row_details = $result->fetch_assoc()) { $cust_detail[] = $row_details; } } $sql = "SELECT * FROM `customer_tokens` where `cid` = '".$row["id"]."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row_token = $result->fetch_assoc()) { $cust_token[] = $row_token; } } } $cus = $customer[0]["name"]; $mob = $customer[0]["mobile"]; $cid =$customer[0]['id']; function send_mail($to, $from, $title, $message) { $headers = "MIME-Version: 1.0 \r\n"; $headers .= "From: $from \n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html;charset=ISO-8859-1 \r\n"; $headers .= "X-Priority: 3\r\n"; $headers .= "X-Mailer: smail-PHP " . phpversion() . "\r\n"; return mail($to, $title, $message, $headers); } $sql = "INSERT INTO `perthdes_new_pro_api`.`booking` (`id`, `cid`, `email`, `booking_date`, `booking_time`, `pickup_addr`, `pickup_lat`, `pickup_long`, `pickoff_addr`, `pickoff_lat`, `pickoff_long`) VALUES (NULL, '".$cid."', '".$_REQUEST["email"]."', '".$_REQUEST["booking_date"]."', '".$_REQUEST["booking_time"]."', '".$_REQUEST["pickup_addr"]."', '".$_REQUEST["pickup_lat"]."', '".$_REQUEST["pickup_long"]."', '".$_REQUEST["pickoff_addr"]."', '".$_REQUEST["pickoff_lat"]."', '".$_REQUEST["pickoff_long"]."')"; if($conn->query($sql)) { $message = '

Hi '.$cus.',

Thanks for your booking. Please check the details below for your booking and location :

Details:


Type DD
Date '.date('d-M-Y H:i:s').'
Token Customer Id '.$cust_token[0]["access_token_value"].'
Name '.$cus.'
Phone '.$mob.'
Pick Up '.$_REQUEST["pickup_addr"].'
To Drop '.$_REQUEST["pickoff_addr"].'
Pick up Location Dimenstions Longitude:'.$_REQUEST["pickup_long"].' latitude:'.$_REQUEST["pickup_lat"].'
To drop Of Location Dimentions Longitude:'.$_REQUEST["pickoff_long"].' latitude:'.$_REQUEST["pickoff_lat"].'
'; $to = $_REQUEST['email']; $from = "booking@perthdesignateddrivers.com.au"; $title = "Booking Details"; if(send_mail($to, $from, $title, $message)) { $Res["message"] = "booking successfully done"; $Res["status"] = "ok"; } else { $Res["message"] = "booking successfully But email has some issue Not send"; $Res["status"] = "ok"; } } else { $Res["message"] = "booking Not done"; $Res["status"] = "error"; } } else { $Res["message"] = "user is not found "; $Res["status"] = "error"; } echo json_encode(new ArrayObject($Res)); //echo "
";
//print_r($data);
//print_r($Res);
//echo "
"; $conn->close(); ?>