master #1
BIN
data/teams.db
BIN
data/teams.db
Binary file not shown.
10
puzzles.php
10
puzzles.php
@ -41,12 +41,12 @@
|
||||
$stmt = $database->pdo_teams->prepare("SELECT pzorder FROM teams WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
$stmt->execute();
|
||||
$order = $stmt->fetch();
|
||||
|
||||
echo (string) $order["pzorder"];
|
||||
$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 ($order == NULL) {
|
||||
if (is_null($order)) {
|
||||
echo "lol";
|
||||
$order = rand(0, sizeof($pzorder));
|
||||
$stmt = $database->pdo_teams->prepare("UPDATE teams SET pzorder = :order WHERE id == :id");
|
||||
$stmt->bindValue(":id", $team_id);
|
||||
@ -83,7 +83,7 @@
|
||||
<article>
|
||||
<p><?= $tr["puzzles"]["message"]?></p>
|
||||
<ul>
|
||||
<?php foreach ($pzorder[$order["pzorder"]] as $pzid) : ?>
|
||||
<?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"] . " : " . $puzzle["title"] ?></a></li>
|
||||
|
Loading…
Reference in New Issue
Block a user