add new featurs like realtime 2026-5-10-10
This commit is contained in:
@@ -462,6 +462,9 @@ function sendFCM_Internal(
|
||||
|
||||
function logAudit($con, $adminId, $action, $tableName = null, $recordId = null, $details = null) {
|
||||
try {
|
||||
if (empty($adminId)) {
|
||||
$adminId = 'unknown_admin';
|
||||
}
|
||||
$stmt = $con->prepare("
|
||||
INSERT INTO `admin_audit_log` (`admin_id`, `action`, `table_name`, `record_id`, `details`)
|
||||
VALUES (:admin_id, :action, :table_name, :record_id, :details)
|
||||
|
||||
@@ -30,12 +30,13 @@ $params[":id"] = $id;
|
||||
$stmt = $con->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
|
||||
// تسجيل العملية في السجل دائماً (حتى لو لم تتغير القيمة) لضمان الشفافية
|
||||
logAudit($con, $user_id, "تحديث عمولة/أسعار النظام (Kazan)", "kazan", $id, $params);
|
||||
|
||||
if ($stmt->rowCount() > 0) {
|
||||
// تسجيل العملية في السجل
|
||||
logAudit($con, $user_id, "تحديث عمولة/أسعار النظام (Kazan)", "kazan", $id, $params);
|
||||
jsonSuccess(null, "Kazan data updated successfully");
|
||||
} else {
|
||||
// تسجيل محاولة التحديث حتى لو لم تتغير القيم (اختياري)
|
||||
// If no rows were changed but execute was successful, it might be because the data is the same
|
||||
jsonSuccess(null, "Kazan data remains unchanged or updated");
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user