36 lines
No EOL
984 B
PHP
36 lines
No EOL
984 B
PHP
<?php
|
|
require_once __DIR__ . '/../../core/Controller.php';
|
|
require_once __DIR__ . '/../services/HealthService.php';
|
|
|
|
class AdminController extends Controller {
|
|
|
|
// 1. Das Haupt-Dashboard
|
|
public function index() {
|
|
$report = HealthService::getHealthReport();
|
|
|
|
$this->view('admin/dashboard', [
|
|
'title' => 'Admin Dashboard',
|
|
'health' => $report
|
|
]);
|
|
}
|
|
|
|
// 2. Die Einstellungen
|
|
public function settings() {
|
|
$this->view('admin/settings', [
|
|
'title' => 'Einstellungen'
|
|
]);
|
|
}
|
|
|
|
// 3. Die Benutzerverwaltung
|
|
public function users() {
|
|
// Erstmal mit Dummy-Daten, bis wir das Model anbinden
|
|
$dummyUsers = [
|
|
['id' => 1, 'name' => 'Admin Phili', 'email' => 'admin@philcore.local', 'status' => 'Active']
|
|
];
|
|
|
|
$this->view('admin/users', [
|
|
'title' => 'Benutzerverwaltung',
|
|
'users' => $dummyUsers
|
|
]);
|
|
}
|
|
} |