2026-10-21 20:22:20 +02:00
|
|
|
|
<?php
|
|
|
|
|
|
$pageTitle = $pageTitle ?? 'Tippspiel 2027';
|
|
|
|
|
|
|
|
|
|
|
|
// Leucht-Hinweis am Menüpunkt "Fragen", wenn eine neue Antwort oder (für
|
|
|
|
|
|
// Admins) eine neue Frage vorliegt.
|
|
|
|
|
|
$questionsGlow = false;
|
|
|
|
|
|
if (App\Core\Auth::check()) {
|
|
|
|
|
|
$questionsGlow = App\Models\Question::hasNewAnswer((int)App\Core\Auth::id());
|
|
|
|
|
|
if (App\Core\Auth::isAdmin()) {
|
|
|
|
|
|
$questionsGlow = $questionsGlow || App\Models\Question::hasNewQuestion();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
?>
|
2026-10-03 17:09:57 +02:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="de">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<title><?php echo htmlspecialchars($pageTitle); ?></title>
|
2026-10-04 23:38:41 +02:00
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2026-10-17 17:21:33 +02:00
|
|
|
|
<meta name="theme-color" content="#14632f">
|
|
|
|
|
|
<meta name="description" content="Hoschis Tippspiel 2027 – Tippgemeinschaft unter Freunden.">
|
|
|
|
|
|
<link rel="manifest" href="/manifest.json">
|
|
|
|
|
|
<link rel="icon" href="/img/icon-192.png">
|
|
|
|
|
|
<link rel="apple-touch-icon" href="/img/icon-180.png">
|
2026-10-04 06:17:13 +02:00
|
|
|
|
<link rel="stylesheet" href="/css/style.css">
|
2026-10-04 06:43:28 +02:00
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
2026-10-03 17:09:57 +02:00
|
|
|
|
</head>
|
2026-10-18 21:40:43 +02:00
|
|
|
|
<body class="<?php echo htmlspecialchars($bodyClass ?? ''); ?>">
|
2026-10-21 20:22:20 +02:00
|
|
|
|
<?php if (App\Core\Auth::check()): ?>
|
2026-10-04 23:38:41 +02:00
|
|
|
|
<nav class="site-nav">
|
|
|
|
|
|
<a href="/" class="brand"><span class="brand-ball">⚽</span> Tippspiel <span class="brand-year">2027</span></a>
|
2026-10-21 20:22:20 +02:00
|
|
|
|
<a href="/index.php?page=questions"<?php if ($questionsGlow): ?> class="is-glowing"<?php endif; ?>>Fragen</a>
|
2026-10-23 17:28:29 +02:00
|
|
|
|
<?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();
|
|
|
|
|
|
?>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<span class="nav-dropdown">
|
|
|
|
|
|
<a href="#" onclick="return false;">Administration</a>
|
|
|
|
|
|
<span class="nav-dropdown-content">
|
2026-10-23 17:28:29 +02:00
|
|
|
|
<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>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<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 & Ergebnisse eintragen</a>
|
|
|
|
|
|
<a href="/index.php?page=admin_roundmails">Runden-E-Mails versenden</a>
|
|
|
|
|
|
<a href="/index.php?page=admin_accounts">Kontoliste</a>
|
2026-10-21 20:22:20 +02:00
|
|
|
|
<a href="/index.php?page=admin_message">Aktuelle Mitteilung</a>
|
2026-10-23 17:28:29 +02:00
|
|
|
|
<a href="/index.php?page=admin_fetcher_activity">Robo-Admin Aktivität</a>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<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'; ?>">
|
|
|
|
|
|
<input type="hidden" name="return" value="<?php echo htmlspecialchars($_SERVER['REQUEST_URI'] ?? '/'); ?>">
|
|
|
|
|
|
<button type="submit" title="Registrierung ist derzeit <?php echo $registrationOpen ? 'offen' : 'geschlossen'; ?>">
|
|
|
|
|
|
Registrierung <?php echo $registrationOpen ? 'schließen' : 'öffnen'; ?>
|
|
|
|
|
|
<small>(derzeit <?php echo $registrationOpen ? 'offen' : 'geschlossen'; ?>)</small>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</form>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</span>
|
2026-10-04 11:27:46 +02:00
|
|
|
|
<?php endif; ?>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<a href="/index.php?page=tipps">Tipps</a>
|
2026-10-03 17:35:26 +02:00
|
|
|
|
<a href="/index.php?page=ranking">Rangliste</a>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<span class="nav-dropdown">
|
|
|
|
|
|
<a href="#" onclick="return false;">Info</a>
|
|
|
|
|
|
<span class="nav-dropdown-content">
|
2026-10-04 23:31:47 +02:00
|
|
|
|
<a href="/index.php?page=guide">Anleitung</a>
|
2026-10-18 21:40:43 +02:00
|
|
|
|
<?php if (App\Core\Auth::isAdmin()): ?>
|
|
|
|
|
|
<a href="/index.php?page=guide_admin">Anleitung-Admin</a>
|
|
|
|
|
|
<?php endif; ?>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<a href="/index.php?page=info_quotas">Quoten</a>
|
|
|
|
|
|
<a href="/index.php?page=money_ranking">Geldrangliste</a>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</span>
|
2026-10-04 23:38:41 +02:00
|
|
|
|
<span class="nav-user">
|
2026-10-04 08:11:52 +02:00
|
|
|
|
<?php if (App\Core\Auth::check()): ?>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
<span class="nav-dropdown">
|
|
|
|
|
|
<a href="#" onclick="return false;">( <?php echo htmlspecialchars(App\Core\Auth::user()['name']); ?> )</a>
|
|
|
|
|
|
<span class="nav-dropdown-content">
|
|
|
|
|
|
<a href="/index.php?page=settings">Einstellungen</a>
|
|
|
|
|
|
<a href="/index.php?page=logout">Abmelden</a>
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</span>
|
2026-10-04 08:11:52 +02:00
|
|
|
|
<?php else: ?>
|
|
|
|
|
|
<a href="/index.php?page=login">Login</a>
|
|
|
|
|
|
<?php endif; ?>
|
2026-10-04 23:15:54 +02:00
|
|
|
|
</span>
|
2026-10-03 17:09:57 +02:00
|
|
|
|
</nav>
|
2026-10-21 20:22:20 +02:00
|
|
|
|
<?php endif; ?>
|
2026-10-04 23:38:41 +02:00
|
|
|
|
<main class="page">
|