Files
nexus/public/page/index.php
2026-03-02 01:45:57 +01:00

22 lines
497 B
PHP
Executable File

<?php
use App\Database;
use App\Repository\KeaHostRepository;
global $appConfig;
$pdo = Database::createPdo($appConfig);
$hosts = [];
$error = null;
if ($pdo) {
try {
$repo = new KeaHostRepository($pdo);
$hosts = $repo->findAll(50);
} catch (\Exception $e) {
$error = "Datenbankfehler: " . $e->getMessage();
}
} else {
$error = "Datenbankverbindung ist nicht konfiguriert oder deaktiviert.";
}
tpl('kea_dashboard', 'landing', compact('hosts', 'error'));