54 lines
1.9 KiB
PHP
54 lines
1.9 KiB
PHP
|
|
<?php
|
||
|
|
// Stellt sicher, dass die benötigten Variablen vorhanden sind
|
||
|
|
if (!isset($round) || !isset($games)) {
|
||
|
|
echo "Fehler: Daten für die Rundenansicht nicht gefunden.";
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
<!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)): ?>
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Anpfiff</th>
|
||
|
|
<th>Heim</th>
|
||
|
|
<th>Gast</th>
|
||
|
|
<th>Ergebnis</th>
|
||
|
|
<th>Status</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<?php foreach ($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>
|
||
|
|
<td><?php echo htmlspecialchars($game['team2']); ?></td>
|
||
|
|
<td><?php echo App\Models\Game::getResultString($game['score1'], $game['score2'], $game['kickoff']); ?></td>
|
||
|
|
<td><?php echo App\Models\Game::isLocked($game['kickoff']) ? 'Gesperrt' : 'Offen'; ?></td>
|
||
|
|
</tr>
|
||
|
|
<?php endforeach; ?>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
<?php else: ?>
|
||
|
|
<p>Für diese Runde wurden keine Spiele gefunden.</p>
|
||
|
|
<?php endif; ?>
|
||
|
|
|
||
|
|
<p><a href="/">Zurück zur Startseite</a></p>
|
||
|
|
</body>
|
||
|
|
</html>
|