2023-06-27 14:31:55 +02:00
|
|
|
<?php
|
|
|
|
require_once "require/base.php";
|
2023-06-28 20:38:52 +02:00
|
|
|
|
2023-09-01 21:31:54 +02:00
|
|
|
if (isset($_COOKIE["team"])) {
|
|
|
|
header("Location: puzzles.php?team=" . htmlspecialchars($_COOKIE["team"]));
|
|
|
|
die();
|
|
|
|
}
|
|
|
|
|
2023-06-28 20:38:52 +02:00
|
|
|
$database = new Database();
|
|
|
|
|
|
|
|
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams");
|
|
|
|
$stmt->execute();
|
|
|
|
$teams = $stmt->fetchAll();
|
2023-06-27 14:31:55 +02:00
|
|
|
?>
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
|
|
<?php
|
|
|
|
require_once $rq_path . "head.php";
|
|
|
|
?>
|
|
|
|
<title><?= $tr["tab_title"]["home"]?></title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<?php
|
|
|
|
require_once $rq_path . "nav.php";
|
|
|
|
?>
|
|
|
|
</header>
|
|
|
|
<main>
|
|
|
|
<header>
|
|
|
|
<h1><?= $tr["page_title"]["home"]?></h1>
|
|
|
|
<p><?= $tr["home"]["subtitle"]?></p>
|
|
|
|
<p><?= $tr["home"]["message"]?></p>
|
|
|
|
</header>
|
2023-06-28 17:41:57 +02:00
|
|
|
<article>
|
2023-06-28 20:38:52 +02:00
|
|
|
<ul>
|
|
|
|
<?php foreach ($teams as $team) : ?>
|
|
|
|
<li><a href="puzzles.php?team=<?= $team["id"] ?>"><?= $tr["home"]["team"] . $team["id"] ?></a></li>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</ul>
|
2023-06-28 17:41:57 +02:00
|
|
|
</article>
|
2023-06-27 14:31:55 +02:00
|
|
|
</main>
|
|
|
|
<footer>
|
|
|
|
<?php
|
|
|
|
require_once $rq_path . "footer.php";
|
|
|
|
?>
|
|
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|