/
home
/
desid573
/
public_html
/
app
/
/home/desid573/public_html/app
mkdir
upload
Name
Size
Mode
Actions
braintree/
-
0755
rm
lib/
-
0755
rm
twilio-php-master/
-
0755
rm
vendor/
-
0755
rm
after_booking_page.php
2595
0644
edit
dl
rm
appoff.php
4782
0644
edit
dl
rm
booking.php
9655
0644
edit
dl
rm
cancel_booking.php
4925
0644
edit
dl
rm
composer.json
65
0644
edit
dl
rm
composer.lock
2355
0644
edit
dl
rm
confirmsend.php
2983
0644
edit
dl
rm
contact_us_mail.php
890
0644
edit
dl
rm
copy_account_to_homekey.php
4334
0644
edit
dl
rm
dispatch.php
877
0644
edit
dl
rm
emailConfirmReset.php
401
0644
edit
dl
rm
error_log
586874
0644
edit
dl
rm
family-cab_small.jpg
98853
0644
edit
dl
rm
generate_credit.php
3098
0644
edit
dl
rm
generate_referall.php
2779
0644
edit
dl
rm
getuser_byid.php
2341
0644
edit
dl
rm
getuser_bymail.php
2183
0644
edit
dl
rm
get_all_booking.php
779
0644
edit
dl
rm
get_booking_bybooking_id.php
813
0644
edit
dl
rm
get_booking_byuser.php
1057
0644
edit
dl
rm
get_booking_status.php
2170
0644
edit
dl
rm
get_completed_bookings.php
710
0644
edit
dl
rm
get_ETA.php
6332
0644
edit
dl
rm
get_lead_message.php
673
0644
edit
dl
rm
get_open_bookings.php
1399
0644
edit
dl
rm
get_payment_byuser.php
1064
0644
edit
dl
rm
get_price.php
760
0644
edit
dl
rm
get_recipes.php
6361
0644
edit
dl
rm
get_TE.php
1217
0644
edit
dl
rm
index.php
10411
0644
edit
dl
rm
index_backup.php
4791
0644
edit
dl
rm
lib_tr.zip
105047
0644
edit
dl
rm
login_api.php
5789
0644
edit
dl
rm
noteconfirm.php
8208
0644
edit
dl
rm
off.php
2854
0644
edit
dl
rm
passwordResetLink.php
5190
0644
edit
dl
rm
pay_file.php
7302
0644
edit
dl
rm
pay_file_back.php
5326
0644
edit
dl
rm
placehold.html
2141
0644
edit
dl
rm
post.php
2535
0644
edit
dl
rm
reset_email.php
1775
0644
edit
dl
rm
reset_phone.php
5717
0644
edit
dl
rm
test_222.php
845
0644
edit
dl
rm
update_api.php
5910
0644
edit
dl
rm
update_api_on_mail.php
4723
0644
edit
dl
rm
validatecode.php
1094
0644
edit
dl
rm
validatephone.php
1055
0644
edit
dl
rm
Edit:
/home/desid573/public_html/app/confirmsend.php
(2983B)
<?php if(isset($_REQUEST['check'])) {$check= $_REQUEST['check'];} ; if(isset($_REQUEST['ref'])) {$ref= $_REQUEST['ref'];} ; require("twilio-php-master/Twilio/autoload.php"); use Twilio\Rest\Client; require("lib/config.php"); $sql = "SELECT * FROM `booking` where id = '".$ref."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row_details = $result->fetch_assoc()) { $booking_detail[] = $row_details; $spatula_link = $row_details['spatula_link']; $quote = $row_details['quote']; $date = $row_details['booking_date']; $time = $row_details['booking_time']; $time = date("g:i A", strtotime($time)); $datetime = "$date $time"; } $sql = "SELECT * FROM `customers` where id = '".$booking_detail[0]['cid']."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row_detail = $result->fetch_assoc()) { $booking_details[] = $row_detail; } } $firebase_token = $booking_details[0]['firebase_token']; $phone = $booking_details[0]['mobile']; } if($check=="check" && !empty($ref)) { if($booking_detail[0]['status'] == "") { echo "no"; } else { echo $booking_detail[0]['status']; } } if($check=="send" && !empty($ref)) { $sql = "UPDATE booking SET status='confirmed' WHERE id='".$ref."'"; $result = $conn->query($sql); $headers = array ( 'Authorization: key=AAAAqi4vwgY:APA91bF2FTZV_AmYn6tI3rUZtQEejPY7F3E6LZcKuw20s1R3xWZr7AcnHQTOiGBFKMyaOAUJBeGlqxvpc8HYnWClwpw-AWwwKZOa0bsNJp9kW5JYVrF8g_LlnRJU0zNpt_Pc-DUv0uYH', 'Content-Type: application/json' ); $curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_URL, 'https://fcm.googleapis.com/fcm/send'); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlObj, CURLOPT_HEADER, 0); curl_setopt($curlObj, CURLOPT_HTTPHEADER, $headers); curl_setopt($curlObj, CURLOPT_POST, 1); curl_setopt($curlObj, CURLOPT_POSTFIELDS, '{ "notification": { "title": "Booking has been confirmed", "body": "Your booking is confirmed, you will be notified when a driver is assigned", "sound": "mySound" }, "to" : "'.$firebase_token.'" "data": { "status": "confirmed", "spatula_link": "'.$spatula_link.'", "bid": "'.$ref.'", "quote": "'.$quote.'" } }'); $response = curl_exec($curlObj); error_log($response); curl_close($curlObj); $result = json_decode($response, true); if($result['failure'] == 1) { $account_sid = 'AC1b4db66d86197058950ad349a2327a85'; $auth_token = '053ae80d10eac3b60c92179d3492badf'; $client = new Client($account_sid, $auth_token); $messages = $client->messages->create("$phone", array('From' => "FamilyCab", 'body' => 'Your booking for '.$datetime.' is confirmed, you will be notified when your driver is en route')); error_log($messages->sid); if($messages) { echo "yes"; } else { echo "no"; } } else { echo "yes"; } }
Save
cmd:
run