correction
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
parent 770e64eb6e
commit 76769f9a0d

@ -251,14 +251,14 @@ class PartieGateway
throw new Exception("La partie est pleine"); throw new Exception("La partie est pleine");
} }
if ($player + 1 == $playerNumberPerGame) { if ($player + 1 == $playerNumberPerGame) {
echo "La partie est all"; echo "La partie est all\n";
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,1)"; $query = "INSERT INTO Participer VALUES (:partie,:utilisateur,1)";
$this->con->executeQuery($query, array( $this->con->executeQuery($query, array(
"partie" => array($idPartie, SQLITE3_INTEGER), "partie" => array($idPartie, SQLITE3_INTEGER),
"utilisateur" => array($mailUtilisateur, SQLITE3_TEXT))); "utilisateur" => array($mailUtilisateur, SQLITE3_TEXT)));
} }
else { else {
echo "La partie n'est pas alll"; echo "La partie n'est pas all\n";
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)"; $query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)";
$this->con->executeQuery($query, array( $this->con->executeQuery($query, array(
"partie" => array($idPartie, SQLITE3_INTEGER), "partie" => array($idPartie, SQLITE3_INTEGER),

@ -177,15 +177,15 @@ class UserController
$idPartie = $reponse[0]; $idPartie = $reponse[0];
if($etat == 1){ if($etat == 1){
// header("Location: index.php?action=launchGame"); // header("Location: index.php?action=launchGame");
header("Location: index.php"); header("Location: index.php?action=goToPresentation");
} }
else{ else{
echo "Vous êtes dans la fille d'attente\n"; echo "Vous êtes dans la fille d'attente\n";
require($rep . $vues['queue']); require($rep . $vues['queue']);
// while ($etat == 0){ while ($etat == 0){
// $etat = $model->getEtatPartie($idPartie); $etat = $model->getEtatPartie($idPartie);
// } }
// header("Location: index.php"); header("Location: index.php?action=goToPresentation");
} }
} catch (Exception $e) { } catch (Exception $e) {
$error = $e->getMessage(); $error = $e->getMessage();

Loading…
Cancel
Save