forked from antux18/ChasseTresorPange
antux18
66956c55c4
Changement du nom en chasse au code. Amélioration affichage de la fenêtre de capture du code. Fix cookie langue.
50 lines
1.3 KiB
PHP
50 lines
1.3 KiB
PHP
<?php
|
|
require_once "require/base.php";
|
|
|
|
if (isset($_COOKIE["team"])) {
|
|
header("Location: puzzles.php?team=" . htmlspecialchars($_COOKIE["team"]));
|
|
die();
|
|
}
|
|
|
|
$database = new Database();
|
|
|
|
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams");
|
|
$stmt->execute();
|
|
$teams = $stmt->fetchAll();
|
|
?>
|
|
|
|
<!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>
|
|
<article>
|
|
<ul>
|
|
<?php foreach ($teams as $team) : ?>
|
|
<li><a href="puzzles.php?team=<?= $team["id"] ?>"><?= $tr["home"]["team"] . $team["id"] ?></a></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</article>
|
|
</main>
|
|
<footer>
|
|
<?php
|
|
require_once $rq_path . "footer.php";
|
|
?>
|
|
</footer>
|
|
</body>
|
|
</html>
|