Nouvelle branche pour le mode énigme aléatoire :
- La page des énigmes n'affiche plus toutes les énigmes, seulement celles résolues. - La page des énigmes contient un bouton pour résoudre une énigme (choisie aléatoirement parmi celles qui ne sont pas résolues). - Un message s'affiche sur la page des énigmes quand toutes sont résolues. Divers : - Définition de fonctions pour les tâches les plus courantes.
This commit is contained in:
parent
bd8275f7ae
commit
cd84b319e7
@ -1,7 +1,9 @@
|
||||
# Jeu de pistes Sarreguemines
|
||||
# Chasse au trésor Lycée Pange
|
||||
|
||||
**Auteur :** Antoine WAEHREN
|
||||
|
||||
Sur cette version, la liste des énigmes n'affiche pas immédiatement toutes les énigmes, uniquement celles qui ont été résolues. L'énigme suivante est choisie aléatoirement.
|
||||
|
||||
## Crédits
|
||||
|
||||
Ce projet utilise le module QR Scanner de NIMIQ : https://github.com/nimiq/qr-scanner
|
||||
|
45
answer.php
45
answer.php
@ -1,30 +1,17 @@
|
||||
<?php
|
||||
require_once "require/base.php";
|
||||
|
||||
$team_id = -1;
|
||||
$art_id = -1;
|
||||
$article = array();
|
||||
|
||||
$database = new Database();
|
||||
$bonus = $database->getArticleNb(); // L'énigme bonus est la dernière
|
||||
|
||||
if (isset($_GET["code"]) && isset($_GET["team"]) && isset($_GET["id"])) {
|
||||
$team_id = htmlspecialchars($_GET["team"]);
|
||||
|
||||
// Recherche du groupe :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->execute();
|
||||
|
||||
// Vérification de l'existence du groupe :
|
||||
if (!empty($stmt->fetch())) {
|
||||
if ($database->checkTeamExists($team_id)) {
|
||||
$art_id = htmlspecialchars($_GET["id"]);
|
||||
|
||||
// Recherche de l'énigme avec son code :
|
||||
$stmt = $database->pdo_article->prepare("SELECT * FROM puzzles WHERE (id == :id AND code == :code)");
|
||||
$stmt->bindValue(":id", $art_id);
|
||||
$stmt->bindValue(":code", htmlspecialchars($_GET["code"]));
|
||||
$stmt->execute();
|
||||
$article = $stmt->fetch();
|
||||
$code = htmlspecialchars($_GET["code"]);
|
||||
$article = $database->getArticle($art_id);
|
||||
|
||||
// Données renvoyées :
|
||||
$data = [
|
||||
@ -33,27 +20,25 @@
|
||||
];
|
||||
|
||||
// Vérification de la combinaison ID énigme + code :
|
||||
if (empty($article)) {
|
||||
// Si la combinaison ne fonctionne pas, affichage de l'indice :
|
||||
$stmt = $database->pdo_article->prepare("SELECT * FROM puzzles WHERE id == :id");
|
||||
$stmt->bindValue(":id", $art_id);
|
||||
$stmt->execute();
|
||||
$article = $stmt->fetch();
|
||||
if (!$database->checkPuzzle($art_id, $code)) {
|
||||
$data["hint"] = $article["hint"];
|
||||
}
|
||||
|
||||
else {
|
||||
// On enregistre la réussite dans la table :
|
||||
// Vérification que ce n'est pas déjà enregistré :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT * FROM solved WHERE (puzzle_id == :puzzle_id AND team_id == :team_id)");
|
||||
$stmt->bindValue(":puzzle_id", $art_id);
|
||||
// Vérification que ce n'est pas déjà enregistré
|
||||
// Si ce n'est pas le cas, on enregistre :
|
||||
if (!$database->isPuzzleSolved($art_id, $team_id)) {
|
||||
$database->solvePuzzle($art_id, $team_id);
|
||||
}
|
||||
|
||||
// On ajoute l'énigme bonus si toutes les autres sont résolues :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT COUNT(*) FROM solved WHERE team_id == :team_id");
|
||||
$stmt->bindValue(":team_id", $team_id);
|
||||
$stmt->execute();
|
||||
|
||||
// Si ce n'est pas le cas, on enregistre :
|
||||
if (empty($stmt->fetch())) {
|
||||
$stmt = $database->pdo_teams->prepare("INSERT INTO solved VALUES (:puzzle_id, :team_id)");
|
||||
$stmt->bindValue(":puzzle_id", $art_id);
|
||||
if ($stmt->fetchAll()[0]["COUNT(*)"] == $bonus - 1) {
|
||||
$stmt = $database->pdo_teams->prepare("UPDATE teams SET bonus = 1 WHERE id = :team_id");
|
||||
$stmt->bindValue(":team_id", $team_id);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
79
article.php
79
article.php
@ -1,63 +1,42 @@
|
||||
<?php
|
||||
require_once "require/base.php";
|
||||
|
||||
$article = array();
|
||||
$solved = false;
|
||||
$team_id = -1;
|
||||
$art_id = -1;
|
||||
$art_index = -1; // Index de l'article dans la liste pzorder assignée à l'équipe
|
||||
|
||||
$database = new Database();
|
||||
|
||||
$max_art = $database->getArticleNb();
|
||||
$bonus = $database->getArticleNb(); // L'énigme bonus est la dernière
|
||||
|
||||
if (isset($_GET["id"]) && isset($_GET["team"])) {
|
||||
$art_id = htmlspecialchars($_GET["id"]);
|
||||
$team_id = htmlspecialchars($_GET["team"]);
|
||||
|
||||
// Recherche de l'énigme indiquée dans la base :
|
||||
$stmt = $database->pdo_article->prepare("SELECT * FROM puzzles WHERE id == :id");
|
||||
$stmt->bindValue(":id", $art_id);
|
||||
$stmt->execute();
|
||||
$article = $stmt->fetch();
|
||||
|
||||
// Vérification de l'existence du groupe et de l'énigme :
|
||||
if (empty($article) || !$database->checkTeamExists($team_id)) {
|
||||
if (!$database->checkArticleExists($art_id)) {
|
||||
if (!$database->checkTeamExists($team_id)) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
else if ($art_id == -1) {
|
||||
header("Location: puzzles.php?team=" . $team_id);
|
||||
die();
|
||||
}
|
||||
else {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
// On cherche l'index de l'article dans la liste pzorder assignée à l'équipe :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT pzorder FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetch();
|
||||
$order = $result["pzorder"];
|
||||
|
||||
// Si un ordre d'énigmes n'a pas été défini au préalable pour cette équipe, on en choisit un au hasard :
|
||||
if (is_null($order)) {
|
||||
$order = rand(0, sizeof($pzorder));
|
||||
$stmt = $database->pdo_teams->prepare("UPDATE teams SET pzorder = :order WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->bindValue(":order", $order);
|
||||
$stmt->execute();
|
||||
// On vérifie si l'énigme bonus n'est pas débloquée :
|
||||
if (!$database->checkTeamBonus($team_id)) {
|
||||
// Si c'est celle qui est sélectionnée, on retourne à la page d'accueil :
|
||||
if ($art_id == $bonus) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$pzo_arr = $pzorder[$order];
|
||||
$art_index = array_search($art_id, $pzo_arr);
|
||||
$prev_art = $pzo_arr[$art_index - 1];
|
||||
if ($art_index == 0) {
|
||||
$prev_art = $pzo_arr[$max_art - 1];
|
||||
}
|
||||
$next_art = $pzo_arr[($art_index + 1) % $max_art];
|
||||
|
||||
// On indique si l'énigme est résolue :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT * FROM solved WHERE (team_id == :team_id AND puzzle_id == :puzzle_id)");
|
||||
$stmt->bindValue(":team_id", $team_id);
|
||||
$stmt->bindValue(":puzzle_id", $art_id);
|
||||
$stmt->execute();
|
||||
$solved = !empty($stmt->fetch());
|
||||
$article = $database->getArticle($art_id);
|
||||
$next_art = $database->getNextPuzzle($team_id);
|
||||
$solved = $database->isPuzzleSolved($art_id, $team_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,20 +63,12 @@
|
||||
</header>
|
||||
<main>
|
||||
<header>
|
||||
<h1><?= $tr["page_title"]["article"] . $art_id ?></h1>
|
||||
<h1><?= $tr["page_title"]["article"] . $art_id . " : " . $article["title"] ?></h1>
|
||||
<h2><?= $article["text"] ?></h2>
|
||||
<section>
|
||||
<a href="article.php?team=<?= $team_id ?>&id=<?= $prev_art ?>">
|
||||
<button><?= $tr["article"]["prev_but"] ?></button>
|
||||
</a>
|
||||
<a href="puzzles.php?team=<?= $team_id ?>">
|
||||
<button><?= $tr["article"]["back_but"] ?></button>
|
||||
</a>
|
||||
<?php if ($solved) : ?>
|
||||
<a href="article.php?team=<?= $team_id ?>&id=<?= $next_art ?>">
|
||||
<button><?= $tr["article"]["next_but"] ?></button>
|
||||
</a>
|
||||
</section>
|
||||
<?php if ($solved) : ?>
|
||||
<p><?= $tr["article"]["success"] ?></p>
|
||||
<?php else : ?>
|
||||
<p><?= $tr["article"]["message"] ?></p>
|
||||
@ -106,7 +77,7 @@
|
||||
<article>
|
||||
<?php if ($solved) : ?>
|
||||
<p><?= $article["answer"] ?></p>
|
||||
<h1><?= $article["reward"] ?></h1>
|
||||
<img src="images/map/puzzles/<?= $article["id"] ?>.png"/>
|
||||
<?php else : ?>
|
||||
<button><?= $tr["article"]["qr_but"] ?></button>
|
||||
<p></p> <!-- Emplacement du message d'erreur JS concernant la caméra. !-->
|
||||
|
BIN
data/article.db
BIN
data/article.db
Binary file not shown.
BIN
data/teams.db
BIN
data/teams.db
Binary file not shown.
16
index.php
16
index.php
@ -2,8 +2,9 @@
|
||||
require_once "require/base.php";
|
||||
|
||||
$database = new Database();
|
||||
$teams = $database->getTeams();
|
||||
|
||||
// Si l'appareil a déjà choisi une équipe, on le redirige vers la bonne page :
|
||||
// Si l'appareil a déjà choisi une équipe, on le redirige vers une énigme :
|
||||
if (isset($_COOKIE["team"])) {
|
||||
$team_id = htmlspecialchars($_COOKIE["team"]);
|
||||
|
||||
@ -11,19 +12,6 @@
|
||||
header("Location: puzzles.php?team=" . $team_id);
|
||||
die();
|
||||
}
|
||||
|
||||
else {
|
||||
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams");
|
||||
$stmt->execute();
|
||||
$teams = $stmt->fetchAll();
|
||||
}
|
||||
}
|
||||
|
||||
// Sinon, on affiche la liste des équipes :
|
||||
else {
|
||||
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams");
|
||||
$stmt->execute();
|
||||
$teams = $stmt->fetchAll();
|
||||
}
|
||||
?>
|
||||
|
||||
|
58
puzzles.php
58
puzzles.php
@ -1,26 +1,18 @@
|
||||
<?php
|
||||
require_once "require/base.php";
|
||||
|
||||
$puzzles = array();
|
||||
$order = 0;
|
||||
$team_id = -1;
|
||||
|
||||
$database = new Database();
|
||||
|
||||
if (isset($_GET["team"])) {
|
||||
$team_id = htmlspecialchars($_GET["team"]);
|
||||
|
||||
// Vérification de l'existence du groupe :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->execute();
|
||||
|
||||
if (empty($stmt->fetch())) {
|
||||
if (!$database->checkTeamExists($team_id)) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
else {
|
||||
if (!isset($_COOKIE["team"])) {
|
||||
// On crée un cookie pour enregistrer l'équipe sélectionnée :
|
||||
setcookie(
|
||||
"team",
|
||||
@ -31,27 +23,14 @@
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
$stmt = $database->pdo_article->prepare("SELECT * FROM puzzles");
|
||||
|
||||
$stmt->execute();
|
||||
$puzzles = $stmt->fetchAll();
|
||||
|
||||
// Recherche de l'ordre des énigmes :
|
||||
$stmt = $database->pdo_teams->prepare("SELECT pzorder FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->execute();
|
||||
$result = $stmt->fetch();
|
||||
$order = $result["pzorder"];
|
||||
|
||||
// Si un ordre d'énigmes n'a pas été défini au préalable pour cette équipe, on en choisit un au hasard :
|
||||
if (is_null($order)) {
|
||||
$order = rand(0, sizeof($pzorder));
|
||||
$stmt = $database->pdo_teams->prepare("UPDATE teams SET pzorder = :order WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->bindValue(":order", $order);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
$solved = $database->getSolvedPuzzles($team_id);
|
||||
$puzzles = [];
|
||||
foreach ($solved as $p) {
|
||||
array_push($puzzles, $database->getArticle($p));
|
||||
}
|
||||
$next_art = $database->getNextPuzzle($team_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,16 +59,23 @@
|
||||
<h1><?= $tr["page_title"]["puzzles"] . $team_id ?></h1>
|
||||
</header>
|
||||
<article>
|
||||
<?php if ($next_art != -1) : ?>
|
||||
<a href="article.php?team=<?= $team_id ?>&id=<?= $next_art ?>">
|
||||
<button><?= $tr["puzzles"]["pz_but"] ?></button>
|
||||
</a>
|
||||
<?php if (!empty($puzzles)) : ?>
|
||||
<p><?= $tr["puzzles"]["message"]?></p>
|
||||
<ul>
|
||||
<?php foreach ($pzorder[$order] as $pzid) : ?>
|
||||
<?php foreach ($puzzles as $puzzle) : ?>
|
||||
<?php if ($puzzle["id"] == $pzid) : ?>
|
||||
<li><a href="article.php?team=<?= $team_id ?>&id=<?= $puzzle["id"] ?>"><?= $tr["page_title"]["article"] . $puzzle["id"] ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<?php else : ?>
|
||||
<p><?= $tr["puzzles"]["success"]?></p>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($puzzles)) : ?>
|
||||
<ul>
|
||||
<?php foreach ($puzzles as $puzzle) : ?>
|
||||
<li><a href="article.php?team=<?= $team_id ?>&id=<?= $puzzle["id"] ?>"><?= $tr["page_title"]["article"] . $puzzle["id"] . " : " . $puzzle["title"] ?></a></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
</main>
|
||||
<footer>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
require_once "database.php";
|
||||
require_once "puzzles_order.php";
|
||||
|
||||
$rq_path = "require/";
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
"answer" TEXT NOT NULL,
|
||||
"location" TEXT NOT NULL,
|
||||
"code" TEXT NOT NULL,
|
||||
"reward" TEXT NOT NULL,
|
||||
PRIMARY KEY("id" AUTOINCREMENT)
|
||||
)');
|
||||
|
||||
@ -25,7 +24,7 @@
|
||||
$this->pdo_teams = new PDO("sqlite:" . dirname(__FILE__) . $data_path . "teams.db");
|
||||
$this->pdo_teams->query('CREATE TABLE IF NOT EXISTS "teams" (
|
||||
"id" INTEGER NOT NULL UNIQUE,
|
||||
"pzorder" INTEGER,
|
||||
"bonus" INTEGER NOT NULL,
|
||||
PRIMARY KEY("id" AUTOINCREMENT)
|
||||
)');
|
||||
|
||||
@ -46,6 +45,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
public function getArticle(int $id) {
|
||||
$stmt = $this->pdo_article->prepare("SELECT * FROM puzzles WHERE id == :id");
|
||||
$stmt->bindValue(":id", $id);
|
||||
$stmt->execute();
|
||||
return $stmt->fetch();
|
||||
}
|
||||
|
||||
public function getArticleNb() {
|
||||
$query = $this->pdo_article->query("SELECT COUNT(*) FROM puzzles");
|
||||
return $query->fetch()["COUNT(*)"];
|
||||
}
|
||||
|
||||
public function checkTeamExists(int $id) {
|
||||
$stmt = $this->pdo_teams->prepare("SELECT * FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $id);
|
||||
@ -53,9 +64,78 @@
|
||||
return !empty($stmt->fetch());
|
||||
}
|
||||
|
||||
public function getArticleNb() {
|
||||
$query = $this->pdo_article->query("SELECT COUNT(*) FROM puzzles");
|
||||
return $query->fetch()["COUNT(*)"];
|
||||
public function checkArticleExists(int $id) {
|
||||
return !empty($this->getArticle($id));
|
||||
}
|
||||
|
||||
public function checkPuzzle(int $id, int $code) {
|
||||
$stmt = $this->pdo_article->prepare("SELECT * FROM puzzles WHERE (id == :id AND code == :code)");
|
||||
$stmt->bindValue(":id", $id);
|
||||
$stmt->bindValue(":code", $code);
|
||||
$stmt->execute();
|
||||
return !empty($stmt->fetch());
|
||||
}
|
||||
|
||||
public function isPuzzleSolved(int $id, int $team) {
|
||||
$stmt = $this->pdo_teams->prepare("SELECT * FROM solved WHERE (team_id == :team_id AND puzzle_id == :puzzle_id)");
|
||||
$stmt->bindValue(":team_id", $team);
|
||||
$stmt->bindValue(":puzzle_id", $id);
|
||||
$stmt->execute();
|
||||
return !empty($stmt->fetch());
|
||||
}
|
||||
|
||||
public function solvePuzzle(int $id, int $team) {
|
||||
$stmt = $this->pdo_teams->prepare("INSERT INTO solved VALUES (:puzzle_id, :team_id)");
|
||||
$stmt->bindValue(":puzzle_id", $id);
|
||||
$stmt->bindValue(":team_id", $team);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
public function getSolvedPuzzles(int $team) {
|
||||
// $team doit être une équipe existante :
|
||||
$stmt = $this->pdo_teams->prepare("SELECT * FROM solved WHERE team_id == :id");
|
||||
$stmt->bindValue(":id", $team);
|
||||
$stmt->execute();
|
||||
$res = $stmt->fetchAll();
|
||||
$solved = [];
|
||||
foreach ($res as $r) {
|
||||
array_push($solved, $r["puzzle_id"]);
|
||||
}
|
||||
return $solved;
|
||||
}
|
||||
|
||||
function getUnsolvedPuzzles(int $team) {
|
||||
$solved = $this->getSolvedPuzzles($team);
|
||||
$unsolved = range(1, $this->getArticleNb());
|
||||
// On supprime les énigmes résolues :
|
||||
foreach ($solved as $p) {
|
||||
$key = array_search($p, $unsolved);
|
||||
array_splice($unsolved, $key, 1);
|
||||
}
|
||||
return $unsolved;
|
||||
}
|
||||
|
||||
public function getNextPuzzle(int $team) {
|
||||
$unsolved = $this->getUnsolvedPuzzles($team);
|
||||
$next = -1; // Quand il n'y a plus d'autre énigme à résoudre
|
||||
if (!empty($unsolved)) {
|
||||
$next = $unsolved[array_rand($unsolved)];
|
||||
}
|
||||
return $next;
|
||||
}
|
||||
|
||||
public function checkTeamBonus(int $team) {
|
||||
// $team doit être une équipe existante :
|
||||
$stmt = $this->pdo_teams->prepare("SELECT bonus FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team);
|
||||
$stmt->execute();
|
||||
return $stmt->fetch()[0] == 1;
|
||||
}
|
||||
|
||||
public function getTeams() {
|
||||
$stmt = $this->pdo_teams->prepare("SELECT * FROM teams");
|
||||
$stmt->execute();
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
|
||||
// public function getTeamsNb() {
|
||||
|
@ -1,45 +1,46 @@
|
||||
<?php
|
||||
$tr = [
|
||||
"tab_title" => [
|
||||
"home" => "Home - Citizen's journey",
|
||||
"team_confirm" => "Team confirmation - Citizen's journey",
|
||||
"puzzles" => "Puzzles list - Citizen's journey",
|
||||
"article" => "Puzzle - Citizen's journey"
|
||||
"home" => "Home - Lycée Pange Code Hunt",
|
||||
"team_confirm" => "Team confirmation - Lycée Pange Code Hunt",
|
||||
"puzzles" => "Puzzles list - Lycée Pange Code Hunt",
|
||||
"article" => "Puzzle - Lycée Pange Code Hunt"
|
||||
],
|
||||
"page_title" => [
|
||||
"home" => "Citizen's journey",
|
||||
"home" => "Code Hunt",
|
||||
"team_confirm" => "Team confirmation",
|
||||
"puzzles" => "Puzzles list for team n°",
|
||||
"article" => "Puzzle n°"
|
||||
],
|
||||
"home" => [
|
||||
"subtitle" => "Welcome to the Citizen's journey!",
|
||||
"message" => "Enter your team number to begin:",
|
||||
"subtitle" => "Welcome to the code hunt of Lycée Jean de Pange of Sarreguemines !",
|
||||
"message" => "Enter your team number to begin :",
|
||||
"team" => "Team number...",
|
||||
"button" => "OK"
|
||||
],
|
||||
"team_confirm" => [
|
||||
"subtitle" => "Please make sure you selected the right team.",
|
||||
"message" => "Your name must appear on the following list: ",
|
||||
"message" => "Your name must appear on the following list : ",
|
||||
"button" => "Yes, this is my team !"
|
||||
],
|
||||
"article" => [
|
||||
"message" => "This puzzle describes a specific place. Head to that place, then scan the QR code you'll find there.",
|
||||
"success" => "Well done ! Your team solved this puzzle !",
|
||||
"back_but" => "Puzzle list",
|
||||
"prev_but" => "🡰 Prev.",
|
||||
"next_but" => "Next 🡲",
|
||||
"next_but" => "Next puzzle",
|
||||
"qr_but" => "Scan QR code",
|
||||
"cam_sel" => "Selected camera:",
|
||||
"cam_sel" => "Selected camera :",
|
||||
"f_cam" => "Front camera",
|
||||
"r_cam" => "Rear camera"
|
||||
],
|
||||
"puzzles" => [
|
||||
"message" => "Select a puzzle in the list below:",
|
||||
"map_desc" => "Here is a map showing the location of the puzzles you already solved:"
|
||||
"message" => "Select a puzzle in the list below :",
|
||||
"success" => "Congratulations, you solved all the puzzles ! You can now select a specific puzzle in the list below :",
|
||||
"pz_but" => "Solve a puzzle",
|
||||
"map_desc" => "Here is a map showing the location of the puzzles you already solved :"
|
||||
],
|
||||
"nav" => [
|
||||
"title" => "Citizen's journey",
|
||||
"title" => "Code Hunt Pange",
|
||||
"home" => "Home"
|
||||
],
|
||||
"footer" => [
|
||||
|
@ -1,19 +1,19 @@
|
||||
<?php
|
||||
$tr = [
|
||||
"tab_title" => [
|
||||
"home" => "Accueil - Parcours citoyen",
|
||||
"team_confirm" => "Confirmation du choix d'équipe - Parcours citoyen",
|
||||
"puzzles" => "Liste des énigmes - Parcours citoyen",
|
||||
"article" => "Énigme - Parcours citoyen"
|
||||
"home" => "Accueil - Chasse au code Lycée Pange",
|
||||
"team_confirm" => "Confirmation du choix d'équipe - Chasse au code Lycée Pange",
|
||||
"puzzles" => "Liste des énigmes - Chasse au code Lycée Pange",
|
||||
"article" => "Énigme - Chasse au code Lycée Pange"
|
||||
],
|
||||
"page_title" => [
|
||||
"home" => "Parcours citoyen",
|
||||
"home" => "Chasse au code",
|
||||
"team_confirm" => "Confirmation du choix d'équipe",
|
||||
"puzzles" => "Liste des puzzles pour l'équipe n°",
|
||||
"article" => "Énigme n°"
|
||||
],
|
||||
"home" => [
|
||||
"subtitle" => "Bienvenue dans le Parcours citoyen !",
|
||||
"subtitle" => "Bienvenue à la chasse au code du Lycée Jean de Pange de Sarreguemines !",
|
||||
"message" => "Pour commencer, veuillez entrer le numéro de votre équipe :",
|
||||
"team" => "Numéro d'équipe...",
|
||||
"button" => "Valider"
|
||||
@ -27,8 +27,7 @@
|
||||
"message" => "Cette énigme décrit un endroit précis. Dirigez-vous vers cet endroit, puis scannez le QR code que vous-y trouverez.",
|
||||
"success" => "Bien joué ! Votre équipe a résolu cette énigme !",
|
||||
"back_but" => "Liste des énigmes",
|
||||
"prev_but" => "🡰 Préc.",
|
||||
"next_but" => "Suiv. 🡲",
|
||||
"next_but" => "Énigme suivante",
|
||||
"qr_but" => "Scanner le QR code",
|
||||
"cam_sel" => "Caméra sélectionnée :",
|
||||
"f_cam" => "Caméra avant",
|
||||
@ -36,14 +35,16 @@
|
||||
],
|
||||
"puzzles" => [
|
||||
"message" => "Choisissez une énigme dans la liste ci-dessous :",
|
||||
"success" => "Félicitations, vous avez résolu toutes les énigmes ! Vous pouvez maintenant sélectionner une énigme en particulier dans la liste ci-dessous :",
|
||||
"pz_but" => "Résoudre une énigme",
|
||||
"map_desc" => "Voici la carte des emplacements des énigmes que vous avez résolues :"
|
||||
],
|
||||
"nav" => [
|
||||
"title" => "Parcours citoyen",
|
||||
"title" => "Chasse au code Pange",
|
||||
"home" => "Accueil"
|
||||
],
|
||||
"footer" => [
|
||||
"text" => "Lycée Jean de Pange Sarreguemines<br><a href='https://forge.chapril.org/Antux/JeuPistesSarreguemines'>Code source</a>"
|
||||
"text" => "Lycée Jean de Pange Sarreguemines<br><a href='https://forge.chapril.org/antux18/ChasseTresorPange'>Code source</a>"
|
||||
]
|
||||
];
|
||||
?>
|
@ -1,9 +0,0 @@
|
||||
<?php
|
||||
$pzorder = [
|
||||
[7,4,3,2,5,8,9,6,10,1],
|
||||
[10,6,8,5,2,7,4,3,9,1],
|
||||
[5,2,7,4,3,6,8,10,9,1],
|
||||
[3,6,8,10,9,4,7,5,2,1],
|
||||
[9,6,10,4,7,8,5,3,2,1]
|
||||
]
|
||||
?>
|
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
require_once "require/base.php";
|
||||
|
||||
$team_id = -1;
|
||||
|
||||
$database = new Database();
|
||||
|
||||
if (isset($_GET["team"])) {
|
||||
|
Loading…
Reference in New Issue
Block a user