Update besar apk finance

This commit is contained in:
Wian Drs
2026-09-11 16:03:00 +07:00
parent d42483b350
commit 4ef15c22ae
897 changed files with 98056 additions and 15979 deletions
+5 -7
View File
@@ -8,19 +8,17 @@ function log_activity($module, $action, $desc, $status = 'success')
$ip = $CI->input->ip_address();
if (!$ip || $ip == '0.0.0.0') {
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'] ??
$_SERVER['REMOTE_ADDR'] ??
'UNKNOWN';
}
if (!$ip || $ip == '0.0.0.0') {
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'UNKNOWN';
}
$CI->db->insert('activity_logs', [
'user_id' => $CI->session->userdata('user_id') ?? 0,
'module' => strtolower($module),
'action' => strtolower($action),
'description' => $desc,
'description' => substr(strip_tags((string) $desc), 0, 1000),
'status' => strtolower($status),
'ip_address' => $ip,
'created_at' => date('Y-m-d H:i:s')
]);
}
}