Page statistiques

This commit is contained in:
leosw
2025-08-30 11:24:04 +02:00
parent 10a72dcdb9
commit 06bf74ea21
3 changed files with 40 additions and 0 deletions

View File

@@ -120,6 +120,19 @@ if(isset($controller->splitted_url[1]) && $user->rankIsHigher("moderator")) {
$notfound = 1;
}
break;
case 'stats':
if ($user->rankIsHigher("moderator")) {
$head['title'] = "Statistiques";
$report = $config['abs_root_folder'];
$command = '(zcat /var/log/nginx/kabano.org-access.log*.gz && cat /var/log/nginx/kabano.org-access.log.1) | goaccess --log-format=COMBINED -o '.escapeshellarg($report);
exec($command, $output, $result);
include ($config['views_folder']."d.admin.stats.html");
}
else {
$notfound = 1;
}
break;
default:
$notfound = 1;
break;