add new featurs like realtime 2026-5-10-3

This commit is contained in:
Hamza-Ayed
2026-05-10 00:22:19 +03:00
parent e12d70af8c
commit d36ab8365e

View File

@@ -47,12 +47,15 @@ try {
$stmt->execute(); $stmt->execute();
$expiring_drivers = $stmt->fetchAll(PDO::FETCH_ASSOC); $expiring_drivers = $stmt->fetchAll(PDO::FETCH_ASSOC);
foreach($expiring_drivers as $d) { foreach($expiring_drivers as $d) {
// فك تشفير البيانات الحساسة
$firstName = $encryptionHelper->decryptData($d['first_name']);
$lastName = $encryptionHelper->decryptData($d['last_name']);
$alerts[] = [ $alerts[] = [
'type' => 'license', 'type' => 'license',
'severity' => 'warning', 'severity' => 'warning',
'title' => 'رخصة كابتن قاربت على الانتهاء', 'title' => 'رخصة كابتن قاربت على الانتهاء',
'description' => "رخصة الكابتن " . $d['first_name'] . " " . $d['last_name'] . " ستنتهي بتاريخ " . $d['expiry_date'] . ".", 'description' => "رخصة الكابتن " . $firstName . " " . $lastName . " ستنتهي بتاريخ " . $d['expiry_date'] . ".",
// We use current time for sorting purposes, but display the expiry date
'date' => date('Y-m-d H:i:s'), 'date' => date('Y-m-d H:i:s'),
'action_id' => $d['id'] 'action_id' => $d['id']
]; ];