Initial commit with updated Auth and media ignored

This commit is contained in:
Hamza-Ayed
2026-04-28 13:04:27 +03:00
commit 67af97474c
477 changed files with 66444 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?php
require_once __DIR__ . '/../connect.php';
// 1. استقبال رقم الهاتف القادم من التطبيق
$phone = filterRequest("phone");
// التحقق من أن الهاتف ليس فارغاً
if ($phone == null) {
jsonError("Phone number is empty");
exit();
}
$phone = $encryptionHelper->encryptData($phone);
// 2. تنفيذ الحذف بشرط تطابق الهاتف وأن الحالة 'yet'
$sql = "DELETE FROM driver
WHERE phone = ?
AND employmentType = 'yet'";
$stmt = $con->prepare($sql);
$stmt->execute(array($phone));
$count = $stmt->rowCount();
if ($count > 0) {
// 3. إرسال رد النجاح ليتم عرضه في التطبيق (Get.snackbar)
jsonSuccess(null, "Driver deleted successfully");
} else {
// إرسال رد فشل (إذا لم يتم العثور على الرقم أو كان السائق مكتملاً)
jsonError("Driver not found or already active");
}
?>