Version 1.6 - Strato Verzeichnis unterhalb tc-ingelfingen

This commit is contained in:
Erik Thiele
2026-05-23 23:32:00 +02:00
parent 54ae12771e
commit 7c5790e856
6 changed files with 69 additions and 32 deletions

View File

@@ -11,18 +11,18 @@ if (!function_exists('renderHeader') || !function_exists('renderAppShell')) {
}
if ($pdo && !isInstalled($pdo)) {
header('Location: /install.php');
header('Location: ' . appPath('install.php'));
exit;
}
$page = $_GET['page'] ?? 'dashboard';
$page = $_GET['page'] ?? 'home';
if (!currentUser() && !in_array($page, ['login', 'reset_password'], true)) {
$page = 'login';
}
$current = currentUser();
if ($current && ($current['role'] ?? '') === 'member' && in_array($page, ['members', 'admin', 'administration'], true)) {
$page = 'dashboard';
$page = 'home';
}
renderHeader(pageTitle($page));