diff --git a/answer.php b/answer.php
index 00aab09..2d328bc 100644
--- a/answer.php
+++ b/answer.php
@@ -56,17 +56,6 @@
$stmt->bindValue(":puzzle_id", $art_id);
$stmt->bindValue(":team_id", $team_id);
$stmt->execute();
-
- // 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();
-
- if ($stmt->fetchAll()[0]["COUNT(*)"] == "12") { // Il y a 12 énigmes sans compter la bonus
- $stmt = $database->pdo_teams->prepare("UPDATE teams SET bonus = 1 WHERE id = :team_id");
- $stmt->bindValue(":team_id", $team_id);
- $stmt->execute();
- }
}
$data["valid_qr"] = true;
diff --git a/article.php b/article.php
index 95783fe..8483a34 100644
--- a/article.php
+++ b/article.php
@@ -27,18 +27,6 @@
}
else {
- // 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 liste des énigmes :
- if ($art_id == $max_art) {
- header("Location: puzzles.php?team=" . $team_id);
- die();
- }
-
- // On retire l'énigme bonus du total :
- $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);
diff --git a/data/article.db b/data/article.db
index 10f51c9..428531b 100644
Binary files a/data/article.db and b/data/article.db differ
diff --git a/data/teams.db b/data/teams.db
index 27d92d3..4bcc555 100644
Binary files a/data/teams.db and b/data/teams.db differ
diff --git a/puzzles.php b/puzzles.php
index de4076a..a88c400 100644
--- a/puzzles.php
+++ b/puzzles.php
@@ -31,20 +31,7 @@
false
);
- // 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 :
- if ($stmt->fetchAll()[0][1] == 1) {
- $stmt = $database->pdo_article->prepare("SELECT * FROM puzzles");
- }
-
- // Sinon, on cache la bonus :
- else {
- $stmt = $database->pdo_article->prepare("SELECT * FROM puzzles WHERE id <> 13");
- }
+ $stmt = $database->pdo_article->prepare("SELECT * FROM puzzles");
$stmt->execute();
$puzzles = $stmt->fetchAll();
diff --git a/require/database.php b/require/database.php
index aa04737..fe69edf 100644
--- a/require/database.php
+++ b/require/database.php
@@ -24,7 +24,6 @@
$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,
- "bonus" INTEGER NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
)');
@@ -57,12 +56,6 @@
return $query->fetch()["COUNT(*)"];
}
- function checkTeamBonus(int $team) {
- // $team doit être une équipe existante :
- $query = $this->pdo_teams->query("SELECT bonus FROM teams WHERE id = " . $team);
- return $query->fetch()[0] == 1;
- }
-
// public function getTeamsNb() {
// $query = $this->pdo_teams->query("SELECT COUNT(*) FROM teams");
// return $query->fetch()["COUNT(*)"];
diff --git a/require/locales/en.php b/require/locales/en.php
index 61bc898..a9e71f7 100644
--- a/require/locales/en.php
+++ b/require/locales/en.php
@@ -1,19 +1,19 @@
[
- "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"
+ "home" => "Home - Citizenship Code Hunt",
+ "team_confirm" => "Team confirmation - Citizenship Code Hunt",
+ "puzzles" => "Puzzles list - Citizenship Code Hunt",
+ "article" => "Puzzle - Citizenship Code Hunt"
],
"page_title" => [
- "home" => "Code Hunt",
+ "home" => "Citizenship Code Hunt",
"team_confirm" => "Team confirmation",
"puzzles" => "Puzzles list for team n°",
"article" => "Puzzle n°"
],
"home" => [
- "subtitle" => "Welcome to the code hunt of Lycée Jean de Pange of Sarreguemines !",
+ "subtitle" => "Welcome to the Citizenship Code Hunt !",
"message" => "Enter your team number to begin :",
"team" => "Team number...",
"button" => "OK"
@@ -38,7 +38,7 @@
"map_desc" => "Here is a map showing the location of the puzzles you already solved :"
],
"nav" => [
- "title" => "Code Hunt Pange",
+ "title" => "Citizenship Code Hunt",
"home" => "Home"
],
"footer" => [
diff --git a/require/locales/fr.php b/require/locales/fr.php
index 3433df2..9494eaf 100644
--- a/require/locales/fr.php
+++ b/require/locales/fr.php
@@ -1,19 +1,19 @@
[
- "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"
+ "home" => "Accueil - Jeu de Pistes de la Citoyenneté",
+ "team_confirm" => "Confirmation du choix d'équipe - Jeu de Pistes de la Citoyenneté",
+ "puzzles" => "Liste des énigmes - Jeu de Pistes de la Citoyenneté",
+ "article" => "Énigme - Jeu de Pistes de la Citoyenneté"
],
"page_title" => [
- "home" => "Chasse au code",
+ "home" => "Jeu de Pistes de la Citoyenneté",
"team_confirm" => "Confirmation du choix d'équipe",
"puzzles" => "Liste des puzzles pour l'équipe n°",
"article" => "Énigme n°"
],
"home" => [
- "subtitle" => "Bienvenue à la chasse au code du Lycée Jean de Pange de Sarreguemines !",
+ "subtitle" => "Bienvenue dans le Jeu de Pistes de la Citoyenneté !",
"message" => "Pour commencer, veuillez entrer le numéro de votre équipe :",
"team" => "Numéro d'équipe...",
"button" => "Valider"
@@ -38,11 +38,11 @@
"map_desc" => "Voici la carte des emplacements des énigmes que vous avez résolues :"
],
"nav" => [
- "title" => "Chasse au code Pange",
+ "title" => "Jeu de Pistes de la Citoyenneté",
"home" => "Accueil"
],
"footer" => [
- "text" => "Lycée Jean de Pange Sarreguemines
Code source"
+ "text" => "Lycée Jean de Pange Sarreguemines
Code source"
]
];
?>
\ No newline at end of file