diff --git a/routes/admin/index.php b/routes/admin/index.php index 6a400be4..e94d436b 100644 --- a/routes/admin/index.php +++ b/routes/admin/index.php @@ -13,4 +13,9 @@ require("../include/main.php"); require("../view/admin/main.php"); }); + +$router->add("/admin/health", function () { + require("../include/main.php"); + require("../view/admin/health.php"); +}); ?> \ No newline at end of file diff --git a/view/admin/health.php b/view/admin/health.php new file mode 100644 index 00000000..476228aa --- /dev/null +++ b/view/admin/health.php @@ -0,0 +1,231 @@ +query($userCountQuery); +$userCount = $userCountResult->fetch_assoc()['user_count']; +$ticketCountQuery = "SELECT COUNT(*) AS ticket_count FROM mythicaldash_tickets"; +$ticketCountResult = $conn->query($ticketCountQuery); +$ticketCount = $ticketCountResult->fetch_assoc()['ticket_count']; +$serverCountQuery = "SELECT COUNT(*) AS servers FROM mythicaldash_servers"; +$serverCountResult = $conn->query($serverCountQuery); +$serverCount = $serverCountResult->fetch_assoc()['servers']; +$serverQueueQuery = "SELECT COUNT(*) AS serversq FROM mythicaldash_servers_queue"; +$serverQueueCountResult = $conn->query($serverQueueQuery); +$serverQueueCount = $serverQueueCountResult->fetch_assoc()['serversq']; +$locationsQuery = "SELECT COUNT(*) AS locations FROM mythicaldash_locations"; +$locationsCountResult = $conn->query($locationsQuery); +$locationsCount = $locationsCountResult->fetch_assoc()['locations']; +$eggsQuery = "SELECT COUNT(*) AS eggs FROM mythicaldash_eggs"; +$eggsCountResult = $conn->query($eggsQuery); +$eggCount = $eggsCountResult->fetch_assoc()['eggs']; +$TotalServers = $serverCount + $serverQueueCount; +?> + + + + +
+ + + += $data['message'] ?>
+