commit
This commit is contained in:
@@ -1,3 +1,22 @@
|
||||
<?php
|
||||
use App\Database;
|
||||
use App\Repository\KeaHostRepository;
|
||||
|
||||
echo "test";
|
||||
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'));
|
||||
Reference in New Issue
Block a user