ycxyxc
All checks were successful
Deploy / deploy (push) Successful in 1m3s

This commit is contained in:
2026-08-04 00:42:40 +02:00
parent fc34e87622
commit fa6e975df4
17 changed files with 701 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ if (!in_array($childGender, ['male', 'female', 'mixed'], true)) {
$debugEnabled = defined('APP_DEBUG') && APP_DEBUG === true;
$locationTrackingPreference = 'prompt';
$showDebugTools = false;
$adminSystemNotice = null;
if (isset($_SESSION['user_id'])) {
try {
$pdo = $app->pdo();
@@ -25,10 +26,30 @@ if (isset($_SESSION['user_id'])) {
$communityConfig = file_exists($communityCfg) ? require $communityCfg : [];
$communityAccess = new \App\CommunityAccess($pdo, $communityConfig);
$showDebugTools = $debugEnabled && $communityAccess->hasRole((int)$_SESSION['user_id'], 'site_admin');
if ($communityAccess->canManageApplications((int)$_SESSION['user_id'])) {
$systemSettings = new \App\SystemSettings($pdo);
$siteMaintenanceMode = $systemSettings->getBool('site_maintenance_mode');
$forumMaintenanceMode = $systemSettings->getBool('forum_maintenance_mode');
$googlePlacesEnabled = $systemSettings->getBool('google_places_enabled');
$parts = [];
if ($siteMaintenanceMode) {
$parts[] = 'Seiten-Wartungsmodus aktiv';
}
if ($forumMaintenanceMode) {
$parts[] = 'Forum-Wartungsmodus aktiv';
}
if ($googlePlacesEnabled) {
$parts[] = 'Google-Places-Vorbereitung aktiv';
}
if ($parts !== []) {
$adminSystemNotice = implode(' · ', $parts);
}
}
}
} catch (\Throwable) {
$locationTrackingPreference = 'prompt';
$showDebugTools = false;
$adminSystemNotice = null;
}
}
$debugFiles = [];
@@ -105,6 +126,11 @@ if ($debugEnabled) {
</script>
<?php tpl('matomo', 'structure'); ?>
<?php tpl('nav', 'structure'); ?>
<?php if ($adminSystemNotice !== null): ?>
<div class="container" style="margin-top:14px;">
<div class="toast-bar" style="border-color:#d4a857; color:#7c5a17;"><?= htmlspecialchars($adminSystemNotice, ENT_QUOTES) ?></div>
</div>
<?php endif; ?>
<div class="cookie-consent" id="cookieConsentBanner" hidden>
<div class="cookie-consent__inner">
<div class="cookie-consent__copy">