Initial commit with updated Auth and media ignored

This commit is contained in:
Hamza-Ayed
2026-04-28 13:04:27 +03:00
commit 67af97474c
477 changed files with 66444 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<?php
require_once __DIR__ . '/../connect.php';
$phoneNumber = filterRequest("phone_number");
$sql = "SELECT
CR.`id`,
CR.`driverID`,
CR.`vin`,
CR.`car_plate`,
CR.`make`,
CR.`model`,
CR.`year`,
CR.`expiration_date`,
CR.`color`,
CR.`owner`,
CR.`color_hex`,
CR.`address`,
CR.`displacement`,
CR.`fuel`,
CR.`registration_date`,
CR.`created_at`,
d.phone
FROM
`CarRegistration` CR
LEFT JOIN driver d ON d.id = CR.driverID
WHERE
CR.`driverID` NOT IN (
SELECT DISTINCT CPE.`driverId`
FROM `carPlateEdit` CPE
)
ORDER BY RAND()
LIMIT 10;
";
$stmt = $con->prepare($sql);
$stmt->execute();
if ($stmt->rowCount() > 0) {
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($rows as &$row) {
$row['vin'] = $encryptionHelper->decryptData($row['vin']);
$row['car_plate'] = $encryptionHelper->decryptData($row['car_plate']);
$row['owner'] = $encryptionHelper->decryptData($row['owner']);
$row['address'] = $encryptionHelper->decryptData($row['address']);
$row['phone'] = $encryptionHelper->decryptData($row['phone']);
}
jsonSuccess($rows);
} else {
jsonError($message = "No Car verified yet found");
}
?>