Robo Admin

This commit is contained in:
torsten 2026-10-23 17:28:29 +02:00
parent a73358d2f1
commit 1c712d0781
20 changed files with 1194 additions and 55 deletions

View file

@ -30,16 +30,35 @@ if (App\Core\Auth::check()) {
<nav class="site-nav">
<a href="/" class="brand"><span class="brand-ball">⚽</span> Tippspiel <span class="brand-year">2027</span></a>
<a href="/index.php?page=questions"<?php if ($questionsGlow): ?> class="is-glowing"<?php endif; ?>>Fragen</a>
<?php if (App\Core\Auth::isAdmin()): $registrationOpen = App\Models\Setting::isRegistrationOpen(); ?>
<?php if (App\Core\Auth::isAdmin()):
$registrationOpen = App\Models\Setting::isRegistrationOpen();
$navSeasons = App\Models\Season::getAll();
$navActiveSeason = App\Models\Season::getCurrent();
$navViewSeasonId = App\Models\Season::viewSeasonId();
?>
<span class="nav-dropdown">
<a href="#" onclick="return false;">Administration</a>
<span class="nav-dropdown-content">
<form method="post" action="/index.php?page=admin" class="nav-dropdown-form nav-season-form">
<input type="hidden" name="action" value="set_view_season">
<input type="hidden" name="return" value="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'] ?? '/'); ?>">
<label for="nav-season-select">Saison ansehen:</label>
<select id="nav-season-select" name="season_id" onchange="this.form.submit()">
<option value="" <?php if ($navViewSeasonId === null) echo 'selected'; ?>>Aktive Saison (alle)</option>
<?php foreach ($navSeasons as $s): ?>
<option value="<?php echo (int)$s['id']; ?>" <?php if ($navViewSeasonId !== null && (int)$s['id'] === $navViewSeasonId) echo 'selected'; ?>>
<?php echo htmlspecialchars($s['name']); ?><?php if ($navActiveSeason && (int)$navActiveSeason['id'] === (int)$s['id']) echo ' (aktiv)'; ?>
</option>
<?php endforeach; ?>
</select>
</form>
<a href="/index.php?page=admin_users">Benutzer verwalten</a>
<a href="/index.php?page=admin_seasons">Saisons verwalten</a>
<a href="/index.php?page=admin_rounds">Spiele &amp; Ergebnisse eintragen</a>
<a href="/index.php?page=admin_roundmails">Runden-E-Mails versenden</a>
<a href="/index.php?page=admin_accounts">Kontoliste</a>
<a href="/index.php?page=admin_message">Aktuelle Mitteilung</a>
<a href="/index.php?page=admin_fetcher_activity">Robo-Admin Aktivität</a>
<form method="post" action="/index.php?page=admin" class="nav-dropdown-form">
<input type="hidden" name="action" value="set_registration">
<input type="hidden" name="registration_open" value="<?php echo $registrationOpen ? '0' : '1'; ?>">