= $tr["page_title"]["puzzles"] . $team_id ?>
= $tr["puzzles"]["message"]?>
pdo_teams->prepare("SELECT * FROM teams WHERE id == :id"); $stmt->bindValue(":id", $team_id); $stmt->execute(); if (empty($stmt->fetchAll())) { header("Location: index.php"); die(); } else { // On vérifie si l'équipe a débloqué l'énigme bonus : $stmt = $database->pdo_teams->prepare("SELECT * FROM teams WHERE id = :id"); $stmt->bindValue(":id", $team_id); $stmt->execute(); // Si c'est le cas, on affiche toutes les énigmes, sinon, on cache la bonus : if ($stmt->fetchAll()[0][1] == 1) { $stmt = $database->pdo_article->prepare("SELECT * FROM puzzles"); } else { $stmt = $database->pdo_article->prepare("SELECT * FROM puzzles WHERE id <> 13"); } $stmt->execute(); $puzzles = $stmt->fetchAll(); } } else { header("Location: index.php"); die(); } ?>
= $tr["puzzles"]["message"]?>