Update: 2026-06-21 02:07:00

This commit is contained in:
Hamza-Ayed
2026-06-21 02:07:00 +03:00
parent af3dcae5b7
commit b2fae9ec66
23 changed files with 1412 additions and 210 deletions

View File

@@ -13,6 +13,11 @@ if ($isDriverCallPassenger === null || $isDriverCallPassenger === "") {
$isDriverCallPassenger = "0";
}
if (!$driverID || !$passengerID || !$rideID) {
jsonError("Missing required fields");
exit();
}
// استخدام التاريخ الحالي
$dateCreated = date("Y-m-d H:i:s");
@@ -42,6 +47,16 @@ $stmt->bindParam(":dateCreated", $dateCreated);
$stmt->execute();
if ($stmt->rowCount() > 0) {
// Invalidate Redis cache key for this driver
if (isset($redis) && $redis !== null && $driverID) {
try {
$today = date("Y-m-d");
$redisKey = "driver:scam_count:" . $driverID . ":" . $today;
$redis->del($redisKey);
} catch (Exception $e) {
error_log("[add.php] Redis cache invalidation failed: " . $e->getMessage());
}
}
jsonSuccess(null, "Driver ride scam data saved successfully");
} else {
jsonError("Failed to save driver ride scam data");