From 4377106919c5bbacf6350fedd833cd0711dcb55a Mon Sep 17 00:00:00 2001 From: torsten Date: Sat, 3 Oct 2026 16:43:00 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20F=C3=BCge=20Rundenansicht=20mit=20Spiel?= =?UTF-8?q?anzeige=20hinzu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aider (gemini/gemini-2.5-pro) --- public/index.php | 15 +++++++++++++ src/Views/round.php | 53 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 src/Views/round.php diff --git a/public/index.php b/public/index.php index 5a373a1..f794170 100644 --- a/public/index.php +++ b/public/index.php @@ -6,6 +6,7 @@ require_once __DIR__ . '/../src/autoload.php'; use App\Core\Database; use App\Models\Game; use App\Models\Tipp; +use App\Models\Round; $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); @@ -54,6 +55,20 @@ if ($uri === '/' || $uri === '/index.php') { } elseif ($uri === '/api/status') { header('Content-Type: application/json'); echo json_encode(['status' => 'ok', 'version' => '2027.1']); +} elseif (preg_match('/^\/round\/(\d+)$/', $uri, $matches)) { + $roundId = $matches[1]; + $round = Round::getById($roundId); + + if (!$round) { + http_response_code(404); + echo "404 Not Found: Runde nicht gefunden."; + exit; + } + + $games = Game::getGamesByRound($roundId); + + // Lade das View-Template für die Rundenansicht + require __DIR__ . '/../src/Views/round.php'; } else { http_response_code(404); echo "404 Not Found"; diff --git a/src/Views/round.php b/src/Views/round.php new file mode 100644 index 0000000..524cde5 --- /dev/null +++ b/src/Views/round.php @@ -0,0 +1,53 @@ + + + + + + Tippspiel 2027 - <?php echo htmlspecialchars($round['name']); ?> + + + +

+ + + + + + + + + + + + + + + + + + + + + + + +
AnpfiffHeimGastErgebnisStatus
format('d.m.Y H:i')); ?>
+ +

Für diese Runde wurden keine Spiele gefunden.

+ + +

Zurück zur Startseite

+ +