Ajout du masquage de l'énigme bonus si les 12 énigmes ne sont pas réussies.

This commit is contained in:
antux18 2023-08-11 21:38:37 +02:00
parent 110f725546
commit 6d2c746441
20 changed files with 27 additions and 3 deletions

View File

@ -56,6 +56,17 @@
$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;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 743 B

BIN
images/qr/qr1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

BIN
images/qr/qr10.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 740 B

BIN
images/qr/qr11.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

BIN
images/qr/qr12.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

BIN
images/qr/qr13.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

BIN
images/qr/qr2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

BIN
images/qr/qr3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

BIN
images/qr/qr4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

BIN
images/qr/qr5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

BIN
images/qr/qr6.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
images/qr/qr7.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 B

BIN
images/qr/qr8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 743 B

BIN
images/qr/qr9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

View File

@ -20,7 +20,20 @@
}
else {
$stmt = $database->pdo_article->prepare("SELECT * FROM puzzles");
// 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][0] == 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();
}

View File

@ -177,12 +177,12 @@ header a:hover {
}
header > h1 {
font-size: 200%;
font-size: 150%;
border: none;
}
header > p:first-of-type {
font-size: 24px !important;
font-size: 20px !important;
text-align: center;
}