Update: 2026-06-11 18:22:57

This commit is contained in:
Hamza-Ayed
2026-06-11 18:22:59 +03:00
parent c5170a88d2
commit 727068b668
629 changed files with 46050 additions and 46109 deletions

View File

@@ -0,0 +1,34 @@
<?php
include "../../connect.php";
$driver_phone = filterRequest("driver_phone");
$sql = "SELECT
`driverToken`.`token`,
`driver`.`id`,
`driver`.`phone`,
`driver`.`name_arabic`as name,
driver.national_number
FROM
`driverToken`
LEFT JOIN `driver` ON `driver`.`id` = `driverToken`.`captain_id`
WHERE
`driver`.`phone` = '$driver_phone'";
$stmt = $con->prepare($sql);
$stmt->execute();
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
if ($data) {
// Print the car location data as JSON
echo json_encode([
'status' => 'success',
'data' => $data
]);
} else {
// Print a failure message
printFailure($message = "No car locations found");
}
?>