diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..7569b84 --- /dev/null +++ b/git_push.sh @@ -0,0 +1,17 @@ +#!/bin/zsh + +# الحصول على التاريخ الحالي +CURRENT_DATE=$(date +"%Y-%m-%d-%H") + +echo "--- 🚀 Starting Deployment ($CURRENT_DATE) ---" + +# إضافة جميع الملفات +git add . + +# تنفيذ الكوميت مع التاريخ +git commit -m "add new features like realtime $CURRENT_DATE" + +# الرفع إلى السيرفر +git push myserver main + +echo "--- ✅ Done ---" diff --git a/serviceapp/getComplaintAllData.php b/serviceapp/getComplaintAllData.php index 3694c2b..6fe69a3 100644 --- a/serviceapp/getComplaintAllData.php +++ b/serviceapp/getComplaintAllData.php @@ -1,180 +1,142 @@ prepare($sql); $stmt->execute(); - $row = $stmt->fetchAll(PDO::FETCH_ASSOC); if ($row) { foreach ($row as &$item) { - if (!empty($item['passengerName'])) { - $dec = $encryptionHelper->decryptData($item['passengerName']); - if ($dec) $item['passengerName'] = $dec; - } - if (!empty($item['driverName'])) { - $dec = $encryptionHelper->decryptData($item['driverName']); - if ($dec) $item['driverName'] = $dec; - } - if (!empty($item['driverToken'])) { - $dec = $encryptionHelper->decryptData($item['driverToken']); - if ($dec) $item['driverToken'] = $dec; - } - if (!empty($item['passengerToken'])) { - $dec = $encryptionHelper->decryptData($item['passengerToken']); - if ($dec) $item['passengerToken'] = $dec; + foreach (['passengerName', 'driverName', 'driverToken', 'passengerToken'] as $field) { + if (!empty($item[$field])) { + $dec = $encryptionHelper->decryptData($item[$field]); + if ($dec) + $item[$field] = $dec; + } } } jsonSuccess($row); @@ -183,5 +145,4 @@ try { } } catch (Exception $e) { jsonError("Database error: " . $e->getMessage()); -} -?> \ No newline at end of file +} \ No newline at end of file