feat: Erweitere Rundenansicht und integriere Hauptmenü
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
parent
15cce6e697
commit
19e40998c2
5 changed files with 107 additions and 64 deletions
|
|
@ -1,27 +1,19 @@
|
|||
<?php
|
||||
// Stellt sicher, dass die benötigten Variablen vorhanden sind
|
||||
if (!isset($round) || !isset($games)) {
|
||||
if (!isset($selectedRound) || !isset($roundsToShow)) {
|
||||
echo "Fehler: Daten für die Rundenansicht nicht gefunden.";
|
||||
exit;
|
||||
}
|
||||
|
||||
$pageTitle = 'Rundenübersicht - ' . htmlspecialchars($selectedRound['name']);
|
||||
require __DIR__ . '/partials/header.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Tippspiel 2027 - <?php echo htmlspecialchars($round['name']); ?></title>
|
||||
<style>
|
||||
body { font-family: sans-serif; margin: 2em; }
|
||||
table { border-collapse: collapse; width: 100%; max-width: 800px; margin-top: 1em;}
|
||||
th, td { border: 1px solid #ccc; padding: 8px; text-align: left; }
|
||||
th { background-color: #f4f4f4; }
|
||||
tr:nth-child(even) { background-color: #f9f9f9; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1><?php echo htmlspecialchars($round['name']); ?></h1>
|
||||
|
||||
<?php if (!empty($games)): ?>
|
||||
|
||||
<h1>Tippübersicht bis: <?php echo htmlspecialchars($selectedRound['name']); ?></h1>
|
||||
|
||||
<?php foreach ($roundsToShow as $round): ?>
|
||||
<h2><?php echo htmlspecialchars($round['name']); ?></h2>
|
||||
<?php if (!empty($round['games'])): ?>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -33,7 +25,7 @@ if (!isset($round) || !isset($games)) {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($games as $game): ?>
|
||||
<?php foreach ($round['games'] as $game): ?>
|
||||
<tr>
|
||||
<td><?php echo htmlspecialchars((new DateTime($game['kickoff']))->format('d.m.Y H:i')); ?></td>
|
||||
<td><?php echo htmlspecialchars($game['team1']); ?></td>
|
||||
|
|
@ -47,7 +39,8 @@ if (!isset($round) || !isset($games)) {
|
|||
<?php else: ?>
|
||||
<p>Für diese Runde wurden keine Spiele gefunden.</p>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<p><a href="/">Zurück zur Startseite</a></p>
|
||||
</body>
|
||||
</html>
|
||||
<p><a href="/">Zurück zur Startseite</a></p>
|
||||
|
||||
<?php require __DIR__ . '/partials/footer.php'; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue