39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
PHP
|
|
<?php
|
||
|
|
$pageTitle = 'Rangliste';
|
||
|
|
require __DIR__ . '/partials/header.php';
|
||
|
|
|
||
|
|
// Stellt sicher, dass die benötigten Variablen vorhanden sind
|
||
|
|
if (!isset($currentSeason) || !isset($ranking)) {
|
||
|
|
echo "Fehler: Daten für die Rangliste nicht gefunden.";
|
||
|
|
exit;
|
||
|
|
}
|
||
|
|
?>
|
||
|
|
|
||
|
|
<h1>Rangliste</h1>
|
||
|
|
<h2>Saison: <?php echo htmlspecialchars($currentSeason['name']); ?></h2>
|
||
|
|
|
||
|
|
<?php if (!empty($ranking)): ?>
|
||
|
|
<table>
|
||
|
|
<thead>
|
||
|
|
<tr>
|
||
|
|
<th>Platz</th>
|
||
|
|
<th>Name</th>
|
||
|
|
<th>Punkte</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
<?php foreach ($ranking as $entry): ?>
|
||
|
|
<tr>
|
||
|
|
<td><?php echo $entry['rank']; ?>.</td>
|
||
|
|
<td><?php echo htmlspecialchars($entry['name']); ?></td>
|
||
|
|
<td><?php echo $entry['score']; ?></td>
|
||
|
|
</tr>
|
||
|
|
<?php endforeach; ?>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
<?php else: ?>
|
||
|
|
<p>Für diese Saison gibt es noch keine Rangliste.</p>
|
||
|
|
<?php endif; ?>
|
||
|
|
|
||
|
|
<?php require __DIR__ . '/partials/footer.php'; ?>
|