feat: Dashboard Insights

This commit is contained in:
slawkens
2026-03-15 13:04:07 +01:00
parent ccd70d2ee3
commit 853520cfc4
3 changed files with 237 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
use MyAAC\Admin\Insights;
defined('MYAAC') or die('Direct access not allowed!');
$getYear = (int)($_GET['year'] ?? date('Y'));
$getMonth = $_GET['month'] ?? (int)date('M') + 1;
$insights = new Insights($db);
$twig->display('insights.html.twig', [
'lastLoginPlayers' => $insights->getLastLoggedPlayers($getYear, $getMonth),
'lastCreatedAccounts' => $insights->getLastCreatedAccounts($getYear, $getMonth),
'firstYear' => $insights->getFirstYear(),
'getYear' => $getYear,
'getMonth' => $getMonth,
'months' => $insights->getMonths(),
]);