diff --git a/backend/auth/captin/create_tester_driver.php b/backend/auth/captin/create_tester_driver.php deleted file mode 100644 index 4cd5bfe4..00000000 --- a/backend/auth/captin/create_tester_driver.php +++ /dev/null @@ -1,159 +0,0 @@ -beginTransaction(); - - // 1. تشفير البيانات الحساسة للحفاظ على خصوصيتها وتطابق الهيكل - $encryptedEmail = $encryptionHelper->encryptData($email); - $encryptedPhone = $encryptionHelper->encryptData($phone); - $encryptedFirstName = $encryptionHelper->encryptData($firstName); - $encryptedLastName = $encryptionHelper->encryptData($lastName); - $encryptedGender = $encryptionHelper->encryptData($gender); - $encryptedBirthdate = $encryptionHelper->encryptData($birthdate); - $encryptedSite = $encryptionHelper->encryptData($site); - - // تشفير كلمة المرور باستخدام BCRYPT - $hashedPassword = password_hash($password, PASSWORD_BCRYPT); - - // 2. التحقق من وجود المستخدم مسبقاً - $stmtCheck = $con->prepare("SELECT id FROM driver WHERE email = :email LIMIT 1"); - $stmtCheck->execute([':email' => $encryptedEmail]); - $existingDriver = $stmtCheck->fetch(PDO::FETCH_ASSOC); - - if ($existingDriver) { - $driverId = $existingDriver['id']; - - // تحديث الحساب الحالي - $sqlDriver = "UPDATE `driver` SET - `phone` = :phone, - `password` = :password, - `gender` = :gender, - `birthdate` = :birthdate, - `site` = :site, - `first_name` = :first_name, - `last_name` = :last_name, - `status` = :status - WHERE `id` = :driverId"; - - $stmtDriver = $con->prepare($sqlDriver); - $stmtDriver->execute([ - ':phone' => $encryptedPhone, - ':password' => $hashedPassword, - ':gender' => $encryptedGender, - ':birthdate' => $encryptedBirthdate, - ':site' => $encryptedSite, - ':first_name' => $encryptedFirstName, - ':last_name' => $encryptedLastName, - ':status' => $status, - ':driverId' => $driverId - ]); - $action = "updated"; - } else { - // توليد معرّف فريد جديد - $driverId = bin2hex(random_bytes(8)); // 16-char hex ID - - // إدراج حساب سائق جديد - $sqlDriver = "INSERT INTO `driver` - (id, phone, email, password, gender, birthdate, site, first_name, last_name, status, bankCode, accountBank) - VALUES - (:driverId, :phone, :email, :password, :gender, :birthdate, :site, :first_name, :last_name, :status, 'CIB', 'yet')"; - - $stmtDriver = $con->prepare($sqlDriver); - $stmtDriver->execute([ - ':driverId' => $driverId, - ':phone' => $encryptedPhone, - ':email' => $encryptedEmail, - ':password' => $hashedPassword, - ':gender' => $encryptedGender, - ':birthdate' => $encryptedBirthdate, - ':site' => $encryptedSite, - ':first_name' => $encryptedFirstName, - ':last_name' => $encryptedLastName, - ':status' => $status - ]); - $action = "created"; - } - - // 3. التحقق وتفعيل رقم الهاتف في جدول phone_verification - $stmtPVCheck = $con->prepare("SELECT id FROM phone_verification WHERE phone_number = :phone LIMIT 1"); - $stmtPVCheck->execute([':phone' => $phone]); - $pvRecord = $stmtPVCheck->fetch(PDO::FETCH_ASSOC); - - if ($pvRecord) { - $stmtPV = $con->prepare("UPDATE phone_verification SET is_verified = 1, driverId = :driverId WHERE phone_number = :phone"); - $stmtPV->execute([':driverId' => $driverId, ':phone' => $phone]); - } else { - $stmtPV = $con->prepare("INSERT INTO phone_verification (phone_number, driverId, email, is_verified) VALUES (:phone, :driverId, :email, 1)"); - $stmtPV->execute([':phone' => $phone, ':driverId' => $driverId, ':email' => $email]); - } - - // 4. إضافة أو تحديث سيارة مرافقة لتجاوز فحص الكابتن بدون سيارة - $stmtCarCheck = $con->prepare("SELECT id FROM CarRegistration WHERE driverID = :driverId LIMIT 1"); - $stmtCarCheck->execute([':driverId' => $driverId]); - $carRecord = $stmtCarCheck->fetch(PDO::FETCH_ASSOC); - - if ($carRecord) { - $sqlCar = "UPDATE CarRegistration SET - make = 'تويوتا', - model = 'راف', - year = 2019, - color = 'أبيض', - owner = 'Siro LLC', - expiration_date = '2030-01-01', - status = 'actives' - WHERE driverID = :driverId"; - $stmtCar = $con->prepare($sqlCar); - $stmtCar->execute([':driverId' => $driverId]); - } else { - $sqlCar = "INSERT INTO CarRegistration - (driverID, vin, car_plate, make, model, year, expiration_date, color, owner, color_hex, fuel, isDefault, status) - VALUES - (:driverId, 'TESTER_VIN', 'TEST-PLATE', 'تويوتا', 'راف', 2019, '2030-01-01', 'أبيض', 'Siro LLC', '#FFFFFF', 'Petrol', 1, 'actives')"; - $stmtCar = $con->prepare($sqlCar); - $stmtCar->execute([':driverId' => $driverId]); - } - - $con->commit(); - - echo json_encode([ - "status" => "success", - "message" => "Tester driver successfully $action.", - "details" => [ - "driver_id" => $driverId, - "email" => $email, - "password" => $password, - "phone" => $phone, - "status" => $status - ] - ], JSON_UNESCAPED_UNICODE); - -} catch (Exception $e) { - if (isset($con)) { - $con->rollBack(); - } - error_log("[Create Tester Driver Error] " . $e->getMessage()); - jsonError("Server error: " . $e->getMessage()); -} -?> diff --git a/backend/auth/create_tester_passenger.php b/backend/auth/create_tester_passenger.php deleted file mode 100644 index 991a9851..00000000 --- a/backend/auth/create_tester_passenger.php +++ /dev/null @@ -1,137 +0,0 @@ -beginTransaction(); - - // 1. تشفير البيانات الحساسة للحفاظ على خصوصيتها وتطابق الهيكل - $encryptedEmail = $encryptionHelper->encryptData($email); - $encryptedPhone = $encryptionHelper->encryptData($phone); - $encryptedFirstName = $encryptionHelper->encryptData($firstName); - $encryptedLastName = $encryptionHelper->encryptData($lastName); - $encryptedGender = $encryptionHelper->encryptData($gender); - $encryptedBirthdate = $encryptionHelper->encryptData($birthdate); - $encryptedSite = $encryptionHelper->encryptData($site); - - // تشفير الحقول الافتراضية - $encryptedSos = $encryptionHelper->encryptData('sos'); - $encryptedEducation = $encryptionHelper->encryptData('none'); - $encryptedEmployment = $encryptionHelper->encryptData('none'); - $encryptedMarital = $encryptionHelper->encryptData('none'); - - // 2. التحقق من وجود الراكب مسبقاً - $stmtCheck = $con->prepare("SELECT id FROM passengers WHERE email = :email LIMIT 1"); - $stmtCheck->execute([':email' => $encryptedEmail]); - $existingPassenger = $stmtCheck->fetch(PDO::FETCH_ASSOC); - - if ($existingPassenger) { - $passengerId = $existingPassenger['id']; - - // تحديث حساب الراكب الحالي - $sqlPassenger = "UPDATE `passengers` SET - `phone` = :phone, - `password` = :password, - `gender` = :gender, - `birthdate` = :birthdate, - `site` = :site, - `first_name` = :first_name, - `last_name` = :last_name, - `status` = 'actives' - WHERE `id` = :passengerId"; - - $stmtPassenger = $con->prepare($sqlPassenger); - $stmtPassenger->execute([ - ':phone' => $encryptedPhone, - ':password' => $password, // خزن كـ plaintext متوافقاً مع الاستعلام القديم - ':gender' => $encryptedGender, - ':birthdate' => $encryptedBirthdate, - ':site' => $encryptedSite, - ':first_name' => $encryptedFirstName, - ':last_name' => $encryptedLastName, - ':passengerId' => $passengerId - ]); - $action = "updated"; - } else { - // توليد معرّف فريد جديد للراكب - $passengerId = bin2hex(random_bytes(8)); // 16-char hex ID - - // إدراج حساب راكب جديد - $sqlPassenger = "INSERT INTO `passengers` - (id, phone, email, password, gender, status, birthdate, site, first_name, last_name, sosPhone, education, employmentType, maritalStatus) - VALUES - (:passengerId, :phone, :email, :password, :gender, 'actives', :birthdate, :site, :first_name, :last_name, :sos, :edu, :emp, :marital)"; - - $stmtPassenger = $con->prepare($sqlPassenger); - $stmtPassenger->execute([ - ':passengerId' => $passengerId, - ':phone' => $encryptedPhone, - ':email' => $encryptedEmail, - ':password' => $password, // خزن كـ plaintext متوافقاً مع الاستعلام القديم - ':gender' => $encryptedGender, - ':birthdate' => $encryptedBirthdate, - ':site' => $encryptedSite, - ':first_name' => $encryptedFirstName, - ':last_name' => $encryptedLastName, - ':sos' => $encryptedSos, - ':edu' => $encryptedEducation, - ':emp' => $encryptedEmployment, - ':marital' => $encryptedMarital - ]); - $action = "created"; - } - - // 3. التحقق وتفعيل رقم الهاتف في جدول phone_verification_passenger - $stmtPVCheck = $con->prepare("SELECT id FROM phone_verification_passenger WHERE phone_number = :phone LIMIT 1"); - $stmtPVCheck->execute([':phone' => $phone]); - $pvRecord = $stmtPVCheck->fetch(PDO::FETCH_ASSOC); - - if ($pvRecord) { - $stmtPV = $con->prepare("UPDATE phone_verification_passenger SET verified = 1, status = 'actives' WHERE phone_number = :phone"); - $stmtPV->execute([':phone' => $phone]); - } else { - $stmtPV = $con->prepare("INSERT INTO phone_verification_passenger (phone_number, verified, status) VALUES (:phone, 1, 'actives')"); - $stmtPV->execute([':phone' => $phone]); - } - - $con->commit(); - - echo json_encode([ - "status" => "success", - "message" => "Tester passenger successfully $action.", - "details" => [ - "passenger_id" => $passengerId, - "email" => $email, - "password" => $password, - "phone" => $phone, - "status" => "actives" - ] - ], JSON_UNESCAPED_UNICODE); - -} catch (Exception $e) { - if (isset($con)) { - $con->rollBack(); - } - error_log("[Create Tester Passenger Error] " . $e->getMessage()); - jsonError("Server error: " . $e->getMessage()); -} -?> diff --git a/backend/index.html b/backend/index.html new file mode 100644 index 00000000..f2303f51 --- /dev/null +++ b/backend/index.html @@ -0,0 +1,511 @@ + + +
+ + +
+ Siro
+ The safest, most reliable, and affordable ride-sharing app in the region. Seamlessly connect with verified captains instantly.
+ + + +
+ Designed with your safety, comfort, and affordability in mind.
+Verified captains, in-app VoIP calls to secure your personal number, and recorded trips to ensure a stress-free travel experience.
+Advanced real-time location matching routes you to the nearest available captain, minimizing wait time and optimizing routing.
+Competitive pricing with absolute transparency. Enjoy card and wallet payments to keep your payment flows smooth and hassle-free.
+
+
+ To delete your account, please open the app and go to the Profile page. Then, tap on - the "Delete My Account" button and follow the instructions.
+To delete your account, please open the app and navigate to the Profile page. Tap on the Delete My Account button and follow the instructions.
+- © - All rights reserved by SEFER -
- + - \ No newline at end of file diff --git a/siro_driver/pubspec.yaml b/siro_driver/pubspec.yaml index bf978d69..6d17b3e9 100644 --- a/siro_driver/pubspec.yaml +++ b/siro_driver/pubspec.yaml @@ -32,7 +32,7 @@ dependencies: flutter_webrtc: ^1.4.1 fl_chart: ^1.2.0 flutter_confetti: ^0.5.1 - flutter_font_icons: ^2.2.5 + flutter_font_icons: ^3.0.0 flutter_rating_bar: ^4.0.1 flutter_staggered_animations: ^1.1.1 flutter_svg: ^2.2.0 diff --git a/siro_rider/android/.kotlin/sessions/kotlin-compiler-12178232079035139137.salive b/siro_rider/android/.kotlin/sessions/kotlin-compiler-12178232079035139137.salive new file mode 100644 index 00000000..e69de29b diff --git a/siro_rider/android/app/build.gradle b/siro_rider/android/app/build.gradle index f8a046f6..edecc175 100644 --- a/siro_rider/android/app/build.gradle +++ b/siro_rider/android/app/build.gradle @@ -62,7 +62,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.siro.siro_rider" + applicationId = "com.siro.rider" // You can update the following values to match your application needs. // For more information, see: https://flutter.dev/to/review-gradle-config. minSdkVersion = 30 diff --git a/siro_rider/android/gradle.properties b/siro_rider/android/gradle.properties index 67660bc4..9b287847 100644 --- a/siro_rider/android/gradle.properties +++ b/siro_rider/android/gradle.properties @@ -7,3 +7,7 @@ android.nonFinalResIds=true dart.obfuscation=true android.enableR8.fullMode=true org.gradle.java.home=/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false diff --git a/siro_rider/pubspec.lock b/siro_rider/pubspec.lock index ad5c5a18..f30277dd 100644 --- a/siro_rider/pubspec.lock +++ b/siro_rider/pubspec.lock @@ -585,10 +585,10 @@ packages: dependency: "direct main" description: name: flutter_font_icons - sha256: d06eb0ab903d0e90a9a758de30892ea0d43221f03dad059970384e62479c787e + sha256: f48e33076b5d97861057e9a9d64544afdbaa8fd0ab0e2f082bc8084a384e7239 url: "https://pub.dev" source: hosted - version: "2.2.7" + version: "3.0.0" flutter_launcher_icons: dependency: "direct main" description: @@ -1305,10 +1305,10 @@ packages: dependency: transitive description: name: matcher - sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6" + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 url: "https://pub.dev" source: hosted - version: "0.12.18" + version: "0.12.19" material_color_utilities: dependency: transitive description: @@ -1321,10 +1321,10 @@ packages: dependency: transitive description: name: meta - sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394" + sha256: "1741988757a65eb6b36abe716829688cf01910bbf91c34354ff7ec1c3de2b349" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" mime: dependency: "direct main" description: @@ -1909,10 +1909,10 @@ packages: dependency: transitive description: name: test_api - sha256: "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636" + sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" url: "https://pub.dev" source: hosted - version: "0.7.9" + version: "0.7.11" timezone: dependency: transitive description: diff --git a/siro_rider/pubspec.yaml b/siro_rider/pubspec.yaml index e68f380f..e5a05cb6 100644 --- a/siro_rider/pubspec.yaml +++ b/siro_rider/pubspec.yaml @@ -2,7 +2,7 @@ name: siro_rider description: "A new Flutter project." publish_to: "none" # Remove this line if you wish to publish to pub.dev -version: 1.0.0+1 +version: 1.0.0+2 environment: sdk: ">=3.0.5 <4.0.0" @@ -35,7 +35,7 @@ dependencies: google_fonts: ^8.0.2 flutter_launcher_icons: ^0.14.4 flutter_rating_bar: ^4.0.1 - flutter_font_icons: ^2.2.7 + flutter_font_icons: ^3.0.0 image_picker: ^1.2.1 # camera: ^0.10.5+5 #to be remove flutter_widget_from_html: ^0.17.1