Update: 2026-07-25 18:43:44

This commit is contained in:
Hamza-Ayed
2026-07-25 18:43:44 +03:00
parent 20ea9aa12c
commit e03b9c30d5
16 changed files with 144 additions and 206 deletions
+1 -16
View File
@@ -10,22 +10,7 @@ if ($role !== 'admin' && $role !== 'super_admin') {
$driver_id = filterRequest('driver_id');
if (!$driver_id) {
try {
$stmt = $con->prepare("SELECT id, first_name, last_name, phone, status FROM driver ORDER BY id DESC LIMIT 20");
$stmt->execute();
$drivers = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach ($drivers as &$d) {
if (!empty($d['first_name'])) $d['first_name'] = $encryptionHelper->decryptData($d['first_name']) ?: $d['first_name'];
if (!empty($d['last_name'])) $d['last_name'] = $encryptionHelper->decryptData($d['last_name']) ?: $d['last_name'];
if (!empty($d['phone'])) $d['phone'] = $encryptionHelper->decryptData($d['phone']) ?: $d['phone'];
}
unset($d);
jsonSuccess($drivers);
exit;
} catch (Throwable $e) {
jsonSuccess([]);
exit;
}
jsonError("Missing driver_id", 400);
}
try {