diff --git a/backend/Admin/adminUser/add_invoice.php b/backend/Admin/adminUser/add_invoice.php index b89ee83..72469ce 100755 --- a/backend/Admin/adminUser/add_invoice.php +++ b/backend/Admin/adminUser/add_invoice.php @@ -59,7 +59,7 @@ if (isset($_FILES['image']) && $_FILES['image']['error'] === UPLOAD_ERR_OK) { exit; } - $linkImage = 'https://intaleq.xyz/intaleq/Admin/adminUser/invoice_images/' . $new_filename; + $linkImage = 'https://intaleq.xyz/siro/Admin/adminUser/invoice_images/' . $new_filename; error_log("[add_invoice.php] ✅ Image uploaded successfully: $linkImage"); } diff --git a/backend/Admin/auth/debug_login.php b/backend/Admin/auth/debug_login.php index 57ee58d..f469e3b 100644 --- a/backend/Admin/auth/debug_login.php +++ b/backend/Admin/auth/debug_login.php @@ -54,7 +54,7 @@ try { } // 5. التحقق من PHP error log الأخير -$logPath = '/home/intaleq-api/logs/php_errors.log'; +$logPath = '/home/siro-api/logs/php_errors.log'; if (file_exists($logPath)) { $lines = file($logPath); $checks['last_5_errors'] = array_map('trim', array_slice($lines, -5)); diff --git a/backend/Admin/auth/loginWallet.php b/backend/Admin/auth/loginWallet.php index 095139a..af4c3c6 100644 --- a/backend/Admin/auth/loginWallet.php +++ b/backend/Admin/auth/loginWallet.php @@ -23,11 +23,11 @@ if ($admin->role !== 'admin' && $admin->role !== 'super_admin') { try { // جلب المفتاح المشترك لسيرفر المحفظة - $payKeyPath = '/home/intaleq-api/.secret_key_pay'; + $payKeyPath = '/home/siro-api/.secret_key_pay'; $payKey = file_exists($payKeyPath) ? trim(file_get_contents($payKeyPath)) : getenv('SECRET_KEY_PAY'); if (empty($payKey)) { - $payKey = trim(@file_get_contents('/home/intaleq-api/.secret_key')); + $payKey = trim(@file_get_contents('/home/siro-api/.secret_key')); } if (empty($payKey)) { diff --git a/backend/Admin/debug/env_test.php b/backend/Admin/debug/env_test.php index afe0cc0..b57fc4b 100644 --- a/backend/Admin/debug/env_test.php +++ b/backend/Admin/debug/env_test.php @@ -36,8 +36,8 @@ foreach ($keysToCheck as $key) { echo "\n\n=== فحص الملفات المباشرة ===\n\n"; $filesToCheck = [ - '/home/intaleq-api/.internal_socket_key', - '/home/intaleq-api/.secret_key_pay' + '/home/siro-api/.internal_socket_key', + '/home/siro-api/.secret_key_pay' ]; foreach ($filesToCheck as $file) { diff --git a/backend/aggregate_files.py b/backend/aggregate_files.py index a0b6fe7..ccba4d1 100644 --- a/backend/aggregate_files.py +++ b/backend/aggregate_files.py @@ -2,13 +2,13 @@ import os # Configuration PROJECT_DIR = '.' -OUTPUT_FILE = 'intaleq_v1_secure_latest.md' +OUTPUT_FILE = 'siro_v1_secure_latest.md' EXCLUDED_DIRS = {'.git', 'vendor', 'node_modules', '.gemini'} EXCLUDED_FILES = {OUTPUT_FILE, 'aggregate_files.py'} def aggregate_files(): with open(OUTPUT_FILE, 'w', encoding='utf-8') as outfile: - outfile.write(f'# Intaleq V1 - Secure Latest Version\n\n') + outfile.write(f'# Siro V1 - Secure Latest Version\n\n') for root, dirs, files in os.walk(PROJECT_DIR): # Prune excluded directories diff --git a/backend/auth/captin/updateShamCashDriver.php b/backend/auth/captin/updateShamCashDriver.php index b8af407..be3abda 100755 --- a/backend/auth/captin/updateShamCashDriver.php +++ b/backend/auth/captin/updateShamCashDriver.php @@ -5,7 +5,7 @@ require_once __DIR__ . '/../../connect.php'; $id = filterRequest("id"); // استقبال بيانات شام كاش من التطبيق -$accountBank = filterRequest("accountBank"); // الاسم (مثال: intaleq) +$accountBank = filterRequest("accountBank"); // الاسم (مثال: siro) $bankCode = filterRequest("bankCode"); // الكود الطويل (مثال: 80f23afe...) // التحقق من وصول البيانات المطلوبة diff --git a/backend/auth/document_syria/ai_document.php b/backend/auth/document_syria/ai_document.php index f8b4715..e050cf7 100755 --- a/backend/auth/document_syria/ai_document.php +++ b/backend/auth/document_syria/ai_document.php @@ -46,7 +46,7 @@ if (!move_uploaded_file($file['tmp_name'], $uploadPath)) { exit; } -$imageUrl = "https://intaleq.xyz/intaleq/auth/uploads/documents/" . $uniqueName ; +$imageUrl = "https://intaleq.xyz/siro/auth/uploads/documents/" . $uniqueName ; $imageData = file_get_contents($uploadPath); $imageBase64 = base64_encode($imageData); diff --git a/backend/auth/document_syria/uploadDocSyria.php b/backend/auth/document_syria/uploadDocSyria.php index 6acb2d4..7cc0aba 100755 --- a/backend/auth/document_syria/uploadDocSyria.php +++ b/backend/auth/document_syria/uploadDocSyria.php @@ -87,7 +87,7 @@ if (!defined('BASE_URL')) { } // ⚙️ مسار الرابط العام (عدّل المسار حسب نشر مشروعك) -$publicPath = "/intaleq/auth/uploads/documents/" . $uniqueName; +$publicPath = "/siro/auth/uploads/documents/" . $uniqueName; $imageUrl = rtrim(BASE_URL, '/') . $publicPath; // ✅ نتيجة نهائية: فقط رابط الصورة وبعض البيانات المفيدة diff --git a/backend/auth/syria/auth_proxy.php b/backend/auth/syria/auth_proxy.php index beb4ac0..067e8d5 100755 --- a/backend/auth/syria/auth_proxy.php +++ b/backend/auth/syria/auth_proxy.php @@ -14,7 +14,7 @@ $redirectUri = 'https://api.tripz-egypt.com/tripz/auth/syria/auth_proxy.php'; // // 3. APP CONFIGURATION: Your Flutter app's custom URI scheme // This is how the browser will redirect back to your app. -$appRedirectScheme = 'intaleqapp://auth'; // e.g., myapp://auth +$appRedirectScheme = 'siroapp://auth'; // e.g., myapp://auth // Create a new Google Client object $client = new Google_Client(); diff --git a/backend/auth/syria/driver/register_driver_and_car.php b/backend/auth/syria/driver/register_driver_and_car.php index ccdc85d..2c2ad71 100755 --- a/backend/auth/syria/driver/register_driver_and_car.php +++ b/backend/auth/syria/driver/register_driver_and_car.php @@ -337,7 +337,7 @@ $pwdHashed = password_hash($rawSecret, PASSWORD_DEFAULT); /* ================== 11) Notification ================== */ try { - $fcmSendUrl = 'https://api.intaleq.xyz/intaleq/ride/firebase/send_fcm.php'; + $fcmSendUrl = 'https://api.intaleq.xyz/siro/ride/firebase/send_fcm.php'; $driverFullName = $raw_first_name . ' ' . $raw_last_name; $notificationTitle = 'تسجيل سائق جديد'; diff --git a/backend/auth/syria/driver/sendWhatsAppDriver.php b/backend/auth/syria/driver/sendWhatsAppDriver.php index 74545fb..7e99465 100755 --- a/backend/auth/syria/driver/sendWhatsAppDriver.php +++ b/backend/auth/syria/driver/sendWhatsAppDriver.php @@ -40,8 +40,10 @@ $otp = (string)rand(100, 999); $nabehUrl = 'https://otp.intaleqapp.com/api/request-otp.php'; $appKey = getenv('NABEH_OTP_APP_KEY'); +$phoneWithPlus = (strpos($receiver, '+') === 0) ? $receiver : '+' . $receiver; + $payload = [ - 'phone' => $receiver, + 'phone' => $phoneWithPlus, 'device_type' => 'android', 'method' => 'whatsapp', 'code' => $otp diff --git a/backend/auth/syria/sendWhatsOpt.php b/backend/auth/syria/sendWhatsOpt.php index 0c7360d..469db6a 100755 --- a/backend/auth/syria/sendWhatsOpt.php +++ b/backend/auth/syria/sendWhatsOpt.php @@ -52,8 +52,10 @@ $otp = (string)rand(100, 999); $nabehUrl = 'https://otp.intaleqapp.com/api/request-otp.php'; $appKey = getenv('NABEH_OTP_APP_KEY'); +$phoneWithPlus = (strpos($receiver, '+') === 0) ? $receiver : '+' . $receiver; + $payload = [ - 'phone' => $receiver, + 'phone' => $phoneWithPlus, 'device_type' => 'android', 'method' => 'whatsapp', 'code' => $otp diff --git a/backend/auth/syria/send_survey.php b/backend/auth/syria/send_survey.php index 6d088da..31d991c 100755 --- a/backend/auth/syria/send_survey.php +++ b/backend/auth/syria/send_survey.php @@ -19,7 +19,7 @@ $surveyMessage = [ "text" => "استطلاع رأي سريع 🌟" ], "body" => [ - "text" => "هل كانت تجربة التسجيل في تطبيق *انطلق* سهلة بالنسبة لك؟\n\n👇 اضغط أحد الخيارات:" + "text" => "هل كانت تجربة التسجيل في تطبيق *سيرو* سهلة بالنسبة لك؟\n\n👇 اضغط أحد الخيارات:" ], "footer" => [ "text" => "للتواصل: +962 7XXXXXXX - رابط التطبيق: https://intaleq.xyz" diff --git a/backend/auth/syria/uploadSyrianDocs.php b/backend/auth/syria/uploadSyrianDocs.php index d5e69ff..bb0cd2f 100755 --- a/backend/auth/syria/uploadSyrianDocs.php +++ b/backend/auth/syria/uploadSyrianDocs.php @@ -10,7 +10,7 @@ const MAX_FILE_MB = 5; const ALLOWED_MIMES = ['image/jpeg','image/png','image/webp']; // فقط صور const UPLOAD_ROOT = __DIR__ . "/../../private_uploads"; // مجلد خاص (غير عام) const SIGN_SECRET = getenv('SECRET_KEY_HMAC'); // غيّرها واقرأها من .env -const PUBLIC_BASE = 'https://syria.intaleq.xyz/intaleq'; // الدومين العلني +const PUBLIC_BASE = 'https://syria.intaleq.xyz/siro'; // الدومين العلني const SIGNED_TTL_SEC = 172800; // 2 days = 60*60*24 // أنشئ مجلد الرفع إن لم يكن موجودًا diff --git a/backend/auth/token_passenger/verify_otp.php b/backend/auth/token_passenger/verify_otp.php index cdc13db..2c3aced 100755 --- a/backend/auth/token_passenger/verify_otp.php +++ b/backend/auth/token_passenger/verify_otp.php @@ -1,6 +1,6 @@ secretKey = trim(file_get_contents('/home/intaleq-api/.secret_key')); + $this->secretKey = trim(file_get_contents('/home/siro-api/.secret_key')); $this->hmacSecret = getenv('SECRET_KEY_HMAC') ?: ''; $this->fpPepper = getenv('FP_PEPPER') ?: ''; $this->issuer = (string)(getenv('APP_ISSUER') ?: ''); @@ -145,7 +145,7 @@ class JwtService self::abort(401, 'Token expired'); } catch (SignatureInvalidException $e) { // محاولة فك التشفير بمفتاح المحفظة (Wallet secret fallback) - $payKeyPath = '/home/intaleq-api/.secret_key_pay'; + $payKeyPath = '/home/siro-api/.secret_key_pay'; $payKey = file_exists($payKeyPath) ? trim(file_get_contents($payKeyPath)) : ''; if ($payKey) { @@ -288,7 +288,7 @@ class JwtService { $keyPath = getenv('INTERNAL_SOCKET_KEY_PATH'); $sent = $_SERVER['HTTP_X_INTERNAL_KEY'] ?? ''; - $expected = (file_exists($keyPath) ? trim(file_get_contents($keyPath)) : '') ?: 'Intaleq_Secure_Bridge_Key_2026_@!socket'; + $expected = (file_exists($keyPath) ? trim(file_get_contents($keyPath)) : '') ?: 'Siro_Secure_Bridge_Key_2026_@!socket'; if (!$expected || !hash_equals($expected, $sent)) { error_log('[SECURITY] Invalid internal key from: ' . ($_SERVER['REMOTE_ADDR'] ?? '?')); diff --git a/backend/core/bootstrap.php b/backend/core/bootstrap.php index 5a4029f..324bf92 100644 --- a/backend/core/bootstrap.php +++ b/backend/core/bootstrap.php @@ -12,7 +12,7 @@ ini_set('display_errors', '0'); ini_set('log_errors', '1'); // تحديد مسار اللوج بشكل ديناميكي (محلياً أو سيرفر) -$logPath = '/home/intaleq-api/logs/php_errors.log'; +$logPath = '/home/siro-api/logs/php_errors.log'; if (!file_exists(dirname($logPath)) || !is_writable(dirname($logPath))) { $logPath = __DIR__ . '/../logs/php_errors.log'; } @@ -40,7 +40,7 @@ if ($vendorPath) require_once $vendorPath; require_once __DIR__ . '/helpers.php'; // تحديد مسار الـ .env بشكل ديناميكي -$envFile = '/home/intaleq-api/env/.env'; +$envFile = '/home/siro-api/env/.env'; if (!file_exists($envFile)) { $envFile = __DIR__ . '/../.env'; // مسار محلي افتراضي } @@ -57,7 +57,7 @@ try { if ($redis->connect($redisHost, $redisPort, 1.5)) { if ($redisPass) $redis->auth($redisPass); - $redis->setOption(Redis::OPT_PREFIX, 'intaleq:'); + $redis->setOption(Redis::OPT_PREFIX, 'siro:'); } else { $redis = null; } diff --git a/backend/driver_socket.php b/backend/driver_socket.php index 9f24cfb..36547e1 100644 --- a/backend/driver_socket.php +++ b/backend/driver_socket.php @@ -171,7 +171,7 @@ function sendFCM_Async(string $token, string $title, string $body, array $rideDa $http = new AsyncHttp(); $http->request( - 'https://api.intaleq.xyz/intaleq/ride/firebase/send_fcm.php', + 'https://api.intaleq.xyz/siro/ride/firebase/send_fcm.php', [ 'method' => 'POST', 'data' => json_encode([ diff --git a/backend/email/sendTripEmail.php b/backend/email/sendTripEmail.php index eb9adc7..476901d 100755 --- a/backend/email/sendTripEmail.php +++ b/backend/email/sendTripEmail.php @@ -25,7 +25,7 @@ if (!$passengerEmail || !filter_var($passengerEmail, FILTER_VALIDATE_EMAIL)) { jsonError("Invalid email address"); } -$INTALEQ_SMTP_PASSWORD = getenv('INTALEQ_SMTP_PASSWORD'); +$SIRO_SMTP_PASSWORD = getenv('SIRO_SMTP_PASSWORD'); // بناء محتوى الإيميل بتصميم عصري وبريميوم $bodyEmail = " @@ -55,12 +55,12 @@ $bodyEmail = "
-

INTALEQ

+

SIRO

Your journey, our priority

Hello, $passengerName!
-

Thank you for choosing INTALEQ. Your trip has been successfully confirmed. Here is your digital receipt:

+

Thank you for choosing SIRO. Your trip has been successfully confirmed. Here is your digital receipt:

@@ -89,7 +89,7 @@ $bodyEmail = "

If you have any questions, feel free to contact our support team at any time.

@@ -102,14 +102,14 @@ try { $mail->Host = 'smtp.hostinger.com'; $mail->SMTPAuth = true; $mail->Username = $EMAIL_ADDRESS; - $mail->Password = $INTALEQ_SMTP_PASSWORD; + $mail->Password = $SIRO_SMTP_PASSWORD; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; - $mail->setFrom($EMAIL_ADDRESS, 'INTALEQ'); + $mail->setFrom($EMAIL_ADDRESS, 'SIRO'); $mail->addAddress($passengerEmail, $passengerName); $mail->isHTML(true); - $mail->Subject = 'Your INTALEQ Trip Details'; + $mail->Subject = 'Your SIRO Trip Details'; $mail->Body = $bodyEmail; $mail->send(); diff --git a/backend/encrypt_decrypt.php b/backend/encrypt_decrypt.php index 80187fd..ca09388 100755 --- a/backend/encrypt_decrypt.php +++ b/backend/encrypt_decrypt.php @@ -3,11 +3,11 @@ require_once realpath(__DIR__ . '/../vendor/autoload.php'); require_once 'load_env.php'; -$env_file = '/home/intaleq-api/env/.env'; +$env_file = '/home/siro-api/env/.env'; loadEnvironment($env_file); -$key = trim(file_get_contents('/home/intaleq-api/.enckey')); +$key = trim(file_get_contents('/home/siro-api/.enckey')); $iv = getenv('initializationVector'); // 16 bytes diff --git a/backend/functions.php b/backend/functions.php index 7ea50f1..e1a6280 100755 --- a/backend/functions.php +++ b/backend/functions.php @@ -8,7 +8,7 @@ use Firebase\JWT\SignatureInvalidException; use Firebase\JWT\BeforeValidException; -$INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_socket_key')); +$INTERNAL_KEY = trim((string)@file_get_contents('/home/siro-api/.internal_socket_key')); /** @@ -23,7 +23,7 @@ $INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_soc function sendToLocationServer($action, $data) { // رابط سيرفر اللوكيشن الداخلي أو العام $url = "http://188.68.36.205:2021"; - $INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim((string)@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => $action, @@ -44,7 +44,7 @@ function sendToLocationServer($action, $data) { function findBestDrivers($con, $lat, $lng, $carType) { // 1. الاتصال بـ Redis لجلب الأقرب $locationServerUrl = "https://location.intaleq.xyz/api_get_nearby.php"; - $INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim((string)@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = ['lat' => $lat, 'lng' => $lng, 'radius' => 5, 'limit' => 100]; @@ -159,7 +159,7 @@ function findBestDrivers($con, $lat, $lng, $carType) { function notifyDriversRideTaken($rideId, $winnerDriverId) { // رابط سيرفر السائقين الداخلي (نفس البورت المستخدم في driver_socket.php) $url = "http://188.68.36.205:2021"; - $INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim((string)@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => 'ride_taken_event', // هذا الأكشن الجديد في السوكيت @@ -181,7 +181,7 @@ function notifyDriversRideTaken($rideId, $winnerDriverId) { function notifyDriversOnLocationServer($drivers_ids_array, $payload, $rideId = null) { // رابط سيرفر اللوكيشن الخارجي $url = "http://188.68.36.205:2021"; - $INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim((string)@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => 'dispatch_order', // اسم الحدث المتفق عليه في socket_server.php هناك @@ -217,10 +217,10 @@ function notifyDriversOnLocationServer($drivers_ids_array, $payload, $rideId = n function notifyPassengerOnRideServer($passenger_id, $payload) { // الرابط لسيرفر سوكيت الركاب — IP مباشر لتجاوز مشاكل الجدار الناري والدومين $url = "http://188.68.36.205:3031"; - $INTERNAL_KEY = trim((string)@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim((string)@file_get_contents('/home/siro-api/.internal_socket_key')); if (empty($INTERNAL_KEY)) { - error_log("[SOCKET_CRITICAL] Internal key missing at /home/intaleq-api/.internal_socket_key"); + error_log("[SOCKET_CRITICAL] Internal key missing at /home/siro-api/.internal_socket_key"); } $postData = [ @@ -263,7 +263,7 @@ function dispatchRideToDrivers($driversData, $rideId, $payloadTemplate, $startNa error_log("🚀 [DISPATCH_START] RideID: $rideId | Drivers Count: $countDrivers"); $socketUrl = 'http://188.68.36.205:2021'; - $internalKeyPath = '/home/intaleq-api/.internal_socket_key'; + $internalKeyPath = '/home/siro-api/.internal_socket_key'; $internalKey = file_exists($internalKeyPath) ? trim((string)@file_get_contents($internalKeyPath)) : ''; foreach ($driversData as $driver) { diff --git a/backend/intaleq_v1.code-workspace b/backend/intaleq_v1.code-workspace index 7909573..56bd15c 100644 --- a/backend/intaleq_v1.code-workspace +++ b/backend/intaleq_v1.code-workspace @@ -4,16 +4,16 @@ "path": "." }, { - "path": "../../../development/App/Intaleq" + "path": "../../../development/App/Siro" }, { - "path": "../../../development/App/intaleq_driver" + "path": "../../../development/App/siro_driver" }, { - "path": "../../../development/App/intaleq_admin" + "path": "../../../development/App/siro_admin" }, { - "path": "../../../development/App/service_intaleq" + "path": "../../../development/App/service_siro" } ], "settings": {} diff --git a/backend/intaleq_v1_secure_latest.md b/backend/intaleq_v1_secure_latest.md index 908030c..f2d4246 100644 --- a/backend/intaleq_v1_secure_latest.md +++ b/backend/intaleq_v1_secure_latest.md @@ -1,4 +1,4 @@ -# Intaleq V1 - Secure Latest Version +# Siro V1 - Secure Latest Version ## File: functions.php ``` @@ -12,7 +12,7 @@ use Firebase\JWT\SignatureInvalidException; use Firebase\JWT\BeforeValidException; -$INTERNAL_KEY = trim(file_get_contents('/home/intaleq-api/.internal_socket_key')); +$INTERNAL_KEY = trim(file_get_contents('/home/siro-api/.internal_socket_key')); /** @@ -27,7 +27,7 @@ $INTERNAL_KEY = trim(file_get_contents('/home/intaleq-api/.internal_socket_key') function sendToLocationServer($action, $data) { // رابط سيرفر اللوكيشن الداخلي أو العام $url = "http://location.intaleq.xyz:2021"; - $INTERNAL_KEY = trim(@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim(@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => $action, @@ -48,7 +48,7 @@ function sendToLocationServer($action, $data) { function findBestDrivers($con, $lat, $lng, $carType) { // 1. الاتصال بـ Redis لجلب الأقرب $locationServerUrl = "https://location.intaleq.xyz/api_get_nearby.php"; - $INTERNAL_KEY = trim(@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim(@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = ['lat' => $lat, 'lng' => $lng, 'radius' => 5, 'limit' => 100]; @@ -162,7 +162,7 @@ function notifyDriversRideTaken($rideId, $winnerDriverId) { // رابط سيرفر السائقين الداخلي (نفس البورت المستخدم في driver_socket.php) $url = getenv('LOCATION_SOCKET_URL'); if (!$url) throw new RuntimeException('LOCATION_SOCKET_URL not configured'); - $INTERNAL_KEY = trim(@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim(@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => 'ride_taken_event', // هذا الأكشن الجديد في السوكيت @@ -185,7 +185,7 @@ function notifyDriversOnLocationServer($drivers_ids_array, $payload, $rideId = n // رابط سيرفر اللوكيشن الخارجي $url = getenv('LOCATION_SOCKET_URL'); if (!$url) throw new RuntimeException('LOCATION_SOCKET_URL not configured'); - $INTERNAL_KEY = trim(@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim(@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => 'dispatch_order', // اسم الحدث المتفق عليه في socket_server.php هناك @@ -225,7 +225,7 @@ function notifyPassengerOnRideServer($passenger_id, $payload) { error_log("[FATAL] PASSENGER_SOCKET_URL not configured"); throw new RuntimeException('PASSENGER_SOCKET_URL not configured'); } - $INTERNAL_KEY = trim(@file_get_contents('/home/intaleq-api/.internal_socket_key')); + $INTERNAL_KEY = trim(@file_get_contents('/home/siro-api/.internal_socket_key')); $postData = [ 'action' => 'update_ride_status', @@ -266,7 +266,7 @@ function dispatchRideToDrivers($driversData, $rideId, $payloadTemplate, $startNa $socketUrl = getenv('LOCATION_SOCKET_URL'); if (!$socketUrl) throw new RuntimeException('LOCATION_SOCKET_URL not configured'); - $internalKeyPath = '/home/intaleq-api/.internal_socket_key'; + $internalKeyPath = '/home/siro-api/.internal_socket_key'; $internalKey = file_exists($internalKeyPath) ? trim(file_get_contents($internalKeyPath)) : ''; foreach ($driversData as $driver) { @@ -377,15 +377,15 @@ function sendFcmNotification($token, $title, $body, $data, $category, $tone) { // authenticateJWT() — النسخة النهائية الكاملة // ─────────────────────────────────────────────────────────────── // قائمة allowedFiles مبنية على هيكل الملفات الفعلي: -// intaleq_v1/ ← الجذر -// intaleq_v1/auth/ ← مشترك راكب/سائق -// intaleq_v1/auth/syria/ ← تسجيل سوريا -// intaleq_v1/auth/captin/ ← تسجيل السائق +// siro_v1/ ← الجذر +// siro_v1/auth/ ← مشترك راكب/سائق +// siro_v1/auth/syria/ ← تسجيل سوريا +// siro_v1/auth/captin/ ← تسجيل السائق // ═══════════════════════════════════════════════════════════════ function authenticateJWT(): object { - $secretKey = trim(file_get_contents('/home/intaleq-api/.secret_key')); + $secretKey = trim(file_get_contents('/home/siro-api/.secret_key')); $hmacSecret = getenv('SECRET_KEY_HMAC'); $fpPepper = getenv('FP_PEPPER'); @@ -1250,7 +1250,7 @@ CREATE TABLE `car_locations` ( /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`intaleqUserDB1`@`%`*/ /*!50003 TRIGGER `trg_before_insert_car_locations` BEFORE INSERT ON `car_locations` FOR EACH ROW BEGIN +/*!50003 CREATE*/ /*!50017 DEFINER=`siroUserDB1`@`%`*/ /*!50003 TRIGGER `trg_before_insert_car_locations` BEFORE INSERT ON `car_locations` FOR EACH ROW BEGIN SET NEW.location_point = ST_PointFromText(CONCAT('POINT(', NEW.longitude, ' ', NEW.latitude, ')'), 4326); END */;; DELIMITER ; @@ -1267,7 +1267,7 @@ DELIMITER ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO' */ ; DELIMITER ;; -/*!50003 CREATE*/ /*!50017 DEFINER=`intaleqUserDB1`@`%`*/ /*!50003 TRIGGER `trg_before_update_car_locations` BEFORE UPDATE ON `car_locations` FOR EACH ROW BEGIN +/*!50003 CREATE*/ /*!50017 DEFINER=`siroUserDB1`@`%`*/ /*!50003 TRIGGER `trg_before_update_car_locations` BEFORE UPDATE ON `car_locations` FOR EACH ROW BEGIN IF NEW.latitude <> OLD.latitude OR NEW.longitude <> OLD.longitude THEN SET NEW.location_point = ST_PointFromText(CONCAT('POINT(', NEW.longitude, ' ', NEW.latitude, ')'), 4326); END IF; @@ -2934,7 +2934,7 @@ try { -سياسة الخصوصية وشروط الخدمة – Intaleq Driver +سياسة الخصوصية وشروط الخدمة – Siro Driver