2023-09-02 01:44:54 +02:00
|
|
|
<?php
|
|
|
|
require_once "require/base.php";
|
|
|
|
|
|
|
|
$team_id = -1;
|
|
|
|
|
|
|
|
$database = new Database();
|
|
|
|
|
|
|
|
if (isset($_GET["team"])) {
|
|
|
|
$team_id = htmlspecialchars($_GET["team"]);
|
|
|
|
|
|
|
|
// Vérification de l'existence du groupe :
|
2023-09-02 02:36:37 +02:00
|
|
|
if ($database->checkTeamExists($team_id)) {
|
2023-09-02 01:44:54 +02:00
|
|
|
// Recherche des membres du groupe :
|
|
|
|
$stmt = $database->pdo_teams->prepare("SELECT * FROM members WHERE team_id == :id");
|
|
|
|
$stmt->bindValue(":id", $team_id);
|
|
|
|
$stmt->execute();
|
|
|
|
$members = $stmt->fetchAll();
|
|
|
|
}
|
2023-09-02 02:36:37 +02:00
|
|
|
|
|
|
|
else {
|
|
|
|
header("Location: index.php");
|
|
|
|
die();
|
|
|
|
}
|
2023-09-02 01:44:54 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
header("Location: index.php");
|
|
|
|
die();
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
|
|
<?php
|
|
|
|
require_once $rq_path . "head.php";
|
|
|
|
?>
|
|
|
|
<title><?= $tr["tab_title"]["team_confirm"] ?></title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<header>
|
|
|
|
<?php
|
|
|
|
require_once $rq_path . "nav.php";
|
|
|
|
?>
|
|
|
|
</header>
|
|
|
|
<main>
|
|
|
|
<header>
|
|
|
|
<h1><?= $tr["page_title"]["team_confirm"] ?></h1>
|
2023-09-03 21:34:28 +02:00
|
|
|
<h2><?= $tr["team_confirm"]["subtitle"] ?></h2>
|
|
|
|
</header>
|
|
|
|
<article>
|
2023-09-02 01:44:54 +02:00
|
|
|
<p>
|
|
|
|
<?= $tr["team_confirm"]["message"] ?>
|
|
|
|
<?php foreach ($members as $member) : ?>
|
2023-09-03 22:11:05 +02:00
|
|
|
<?= $member[0] ?>,
|
2023-09-02 01:44:54 +02:00
|
|
|
<?php endforeach; ?>
|
|
|
|
</p>
|
|
|
|
<a href="puzzles.php?team=<?= $team_id ?>">
|
|
|
|
<button><?= $tr["team_confirm"]["button"] ?></button>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
</main>
|
|
|
|
<footer>
|
|
|
|
<?php
|
|
|
|
require_once $rq_path . "footer.php";
|
|
|
|
?>
|
|
|
|
</footer>
|
|
|
|
</body>
|
|
|
|
</html>
|