2023-06-27 14:31:55 +02:00
|
|
|
<?php
|
|
|
|
require_once "require/base.php";
|
2023-06-28 20:38:52 +02:00
|
|
|
|
2023-09-02 02:36:37 +02:00
|
|
|
$database = new Database();
|
2024-09-01 21:02:51 +02:00
|
|
|
$teams = $database->getTeams();
|
2023-09-02 02:36:37 +02:00
|
|
|
|
2024-09-01 21:02:51 +02:00
|
|
|
// Si l'appareil a déjà choisi une équipe, on le redirige vers une énigme :
|
2023-09-01 21:31:54 +02:00
|
|
|
if (isset($_COOKIE["team"])) {
|
2023-09-02 02:36:37 +02:00
|
|
|
$team_id = htmlspecialchars($_COOKIE["team"]);
|
|
|
|
|
|
|
|
if ($database->checkTeamExists($team_id)) {
|
|
|
|
header("Location: puzzles.php?team=" . $team_id);
|
|
|
|
die();
|
|
|
|
}
|
2023-09-02 01:00:27 +02:00
|
|
|
}
|
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>
|
2023-09-03 21:34:28 +02:00
|
|
|
<h2><?= $tr["home"]["subtitle"]?></h2>
|
2023-06-27 14:31:55 +02:00
|
|
|
</header>
|
2023-06-28 17:41:57 +02:00
|
|
|
<article>
|
2023-09-03 21:34:28 +02:00
|
|
|
<p><?= $tr["home"]["message"]?></p>
|
2023-09-02 02:36:37 +02:00
|
|
|
<form action="team_confirm.php" method="get">
|
|
|
|
<input type="number" name="team" placeholder="<?= $tr['home']['team'] ?>">
|
|
|
|
<button type="submit"><?= $tr["home"]["button"] ?></button>
|
|
|
|
</form>
|
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>
|