This commit is contained in:
2026-02-03 01:32:31 +01:00
parent 42f49f275e
commit 0668de87af
4 changed files with 52 additions and 11 deletions

View File

@@ -17,8 +17,12 @@ if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$clientIp = (string)($_SERVER['REMOTE_ADDR'] ?? '');
}
$clientIp = trim($clientIp);
$accessLine = date(DATE_ATOM) . ' | ' . ($clientIp !== '' ? $clientIp : 'unknown') . "\n";
@file_put_contents($debugDir . '/last_access.log', $accessLine);
$version = $GLOBALS['app_version'] ?? '';
$versionLabel = $version ? (' | v' . $version) : '';
$accessLine = date(DATE_ATOM) . ' | ' . ($clientIp !== '' ? $clientIp : 'unknown') . $versionLabel . "\n";
$logFile = $debugDir . '/last_access.log';
$existing = is_file($logFile) ? (string)@file_get_contents($logFile) : '';
@file_put_contents($logFile, $accessLine . $existing);
$pageTitle = 'Email Template System Admin';
$pageId = 'home';