/home/desid573/public_html/angel
NameSizeModeActions
assets/-0755rm
drivers/-0755rm
font/-0755rm
lib/-0755rm
payment/-0755rm
stripe/-0755rm
twilio-php-master/-0755rm
vendor/-0755rm
after_booking_page.php25950644editdlrm
angeldrivers.png1320950644editdlrm
a_name_address.php12890644editdlrm
booking.php96210644editdlrm
booking_28-04-2017.php9470644editdlrm
booking_29-04-2017.php37170644editdlrm
cancel.php24300644editdlrm
cancel_booking.php53670644editdlrm
composer.json650644editdlrm
composer.lock23550644editdlrm
confirmsend.php25820644editdlrm
contact_us_mail.php9030644editdlrm
dispatch.php8640644editdlrm
error_log4362574560644editdlrm
generate_credit.php31870644editdlrm
generate_referall.php27790644editdlrm
getPrice.php7380644editdlrm
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.php14650644editdlrm
get_payment_byuser.php10640644editdlrm
home.php16600644editdlrm
homekey_img.png140370644editdlrm
hook.php212670644editdlrm
hook_set_up.php6540644editdlrm
index.php120070644editdlrm
index_backup.php47910644editdlrm
jobdetails.php121970644editdlrm
lib_tr.zip1050470644editdlrm
login_api.php77980644editdlrm
login_api_old.php56530644editdlrm
noteconfirm.php92590644editdlrm
online_booking.php282830644editdlrm
passwordResetLink.php51950644editdlrm
pay_file.php73020644editdlrm
pay_file_back.php53260644editdlrm
placehold.html21840644editdlrm
priceCheck.php00644editdlrm
reset_email.php17550644editdlrm
search.php8300644editdlrm
send_bulk_notif.php16920644editdlrm
setprice.php44290644editdlrm
setprice_database.php5850644editdlrm
smsconfirm.php98300644editdlrm
smssend.php23540644editdlrm
stripe-php-master.zip2543660644editdlrm
test1.php1590644editdlrm
test_222.php8450644editdlrm
thankyou.php174700644editdlrm
update_api.php62900644editdlrm
update_api_on_mail.php46770644editdlrm
validatecode.php10940644editdlrm
validatephone.php10340644editdlrm
Edit: /home/desid573/public_html/angel/login_api.php (7798B)
query($sql); if ($result->num_rows > 0) { $Res = processLogin($result); } else { if(isset($_REQUEST["google_id"]) && $_REQUEST["google_id"] != "") { $sql = "SELECT * FROM google_id where google_id = '".$_REQUEST["google_id"]."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $cid = $row["cid"]; $sql = "SELECT * FROM customers where id = ".$cid; $result = $conn->query($sql); if ($result->num_rows > 0) { $Res = processLogin($result); } else { $Res["message"] = "Google account not connected to an active account"; $Res["status"] = "missing_account"; } } else { $Res["message"] = "Google account not connected to an active account"; $Res["status"] = "missing_account"; } } else if(isset($_REQUEST["facebook_id"]) && $_REQUEST["facebook_id"] != "") { $sql = "SELECT * FROM facebook_id where facebook_id = '".$_REQUEST['facebook_id']."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $cid = $row["cid"]; $sql = "SELECT * FROM customers where id = ".$cid; $result = $conn->query($sql); if ($result->num_rows > 0) { $Res = processLogin($result); } else { $Res["message"] = "Facebook account not connected to an active account"; $Res["status"] = "missing_account"; } } else { $Res["message"] = "Facebook Account Not Connected to an Active DesiDrivers Account"; $Res["status"] = "missing_account"; } } else { $Res["message"] = "Username or password not correct"; $Res["status"] = "error"; } } function processLogin($result) { global $conn; 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 `promo_codes` where `code` = '".$row["promo_code"]."'"; $result = $conn->query($sql); if($result->num_rows > 0) { $values = $result->fetch_assoc(); $code_value = $values["value"]; } else { $sql = "SELECT * FROM referrals where code = '".$row["promo_code"]."'"; $result = $conn->query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $code_value = $row['value']; } } $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; } } } $Res["message"] = "Login Successful"; $Res["staus"] = "OK"; $Res["status"] = "OK"; $sql = "SELECT * FROM `new_lang_lat`"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($lang_lat = $result->fetch_assoc()) { $lang_lati[] = $lang_lat; } } $sql = "SELECT array FROM `homekey_lat_lng` WHERE `id`=1"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($homekey_lang_lat = $result->fetch_assoc()) { $homekey_lang_lati = $homekey_lang_lat['array']; } } $sql = "SELECT array FROM `homekey_lat_lng` WHERE `id`=2"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($zone1 = $result->fetch_assoc()) { $homekey_zone1 = $zone1['array']; } } $sql = "SELECT array FROM `homekey_lat_lng` WHERE `id`=3"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($zone2 = $result->fetch_assoc()) { $homekey_zone2 = $zone2['array']; } } $sql = "SELECT * FROM `flag_val`"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($flag_val = $result->fetch_assoc()) { $flag_value[] = $flag_val; } } $sql = "SELECT * FROM `homekey_hours`"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($hours = $result->fetch_assoc()) { $start_time = $hours['time_start']; $end_time = $hours['time_end']; } } $sql = "SELECT `lead_time` FROM `lead_time_poly` WHERE zone = 1"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($leadtimes = $result->fetch_assoc()) { $zone1 = $leadtimes['lead_time']; } } $sql = "SELECT `lead_time` FROM `lead_time_poly` WHERE zone = 2"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($leadtimes = $result->fetch_assoc()) { $zone2 = $leadtimes['lead_time']; } }$sql = "SELECT `lead_time` FROM `lead_time_poly` WHERE zone = 3"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($leadtimes = $result->fetch_assoc()) { $zone3 = $leadtimes['lead_time']; } } $sql = "SELECT * FROM `prices` WHERE id = 0"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($prices = $result->fetch_assoc()) { $HKbase = $prices['base']; $HKkm = $prices['km']; $HKtime = $prices['time']; } } $sql = "SELECT * FROM `prices` WHERE id = 1"; $result = $conn->query($sql); if ($result->num_rows > 0) { while($prices = $result->fetch_assoc()) { $SIbase = $prices['base']; $SIkm = $prices['km']; $SItime = $prices['time']; } } if(isset($_REQUEST["all"])) { $Res["data"] = $customer; $Res["cust_detail"] = $cust_detail; $Res["cust_token"] = $cust_token; } else { $Res["data"]["name"] = $customer[0]["name"]; $Res["data"]["mobile"] = $customer[0]["mobile"]; $Res["data"]["email"] = $customer[0]["email"]; $Res["data"]["address"] = $cust_detail[0]["address"]; $Res["data"]["addr_lat"] = $cust_detail[0]["addr_lat"]; $Res["data"]["addr_long"] = $cust_detail[0]["addr_long"]; $Res["data"]["lang_lati"] = $lang_lati; $Res["data"]["flag_value"] = $flag_value; $Res["data"]["homekey_lat_lng"] = $homekey_lang_lati; $Res["data"]["homekey_zone1"] = $homekey_zone1; $Res["data"]["homekey_zone2"] = $homekey_zone2; $Res["data"]["homekey_start"] = $start_time; $Res["data"]["homekey_end"] = $end_time; $Res["data"]["zone_1"] = $zone1; $Res["data"]["zone_2"] = $zone2; $Res["data"]["zone_3"] = $zone3; $Res["data"]["promo_code"] = $customer[0]["promo_code"]; $Res["data"]["promo_value"] = $code_value; $Res["data"]["price_base"] = $HKbase; $Res["data"]["price_km"] = $HKkm; $Res["data"]["price_time"] = $HKtime; $Res["data"]["std_base"] = $SIbase; $Res["data"]["std_km"] = $SIkm; $Res["data"]["std_time"] = $SItime; } return $Res; } if($_REQUEST['firebase_token'] != ""){ $sql = "UPDATE customers SET firebase_token='".$_REQUEST["firebase_token"]."' WHERE email = '".$_REQUEST['username']."'"; $result = $conn->query($sql); } echo json_encode(new ArrayObject($Res)); //echo "
";
//print_r($Res);
//print_r($response);
//echo "
"; $conn->close(); // =============== New customer user api End Here ========================== ?>