diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index e7d3368c..b6f587fb 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -173,12 +173,6 @@ class UserController { try { global $rep, $vues, $error; - $model = new UserModel(); - $utilisateur = $_SESSION['utilisateur']; - $reponse = $model->addToQueue($utilisateur->getEmail()); - $etat = $reponse[1]; - $idPartie = $reponse[0]; - $lesJoueurs = $model->getLesJoueurs($idPartie); require($rep . $vues['queue']); } catch (Exception $e) { $error = $e->getMessage(); @@ -189,8 +183,11 @@ class UserController try { global $rep, $vues, $error; $model = new UserModel(); - $etat = $_GET['etat']; - $idPartie = $_GET['idPartie']; + $utilisateur = $_SESSION['utilisateur']; + $reponse = $model->addToQueue($utilisateur->getEmail()); + $etat = $reponse[1]; + $idPartie = $reponse[0]; + $lesJoueurs = $model->getLesJoueurs($idPartie); if($etat == 1){ // header("Location: index.php?action=launchGame"); header("Location: index.php?action=goToPresentation"); diff --git a/WEB/View/src/pages/Multijoueur/FileAttente.php b/WEB/View/src/pages/Multijoueur/FileAttente.php index 4240d472..88cf0516 100644 --- a/WEB/View/src/pages/Multijoueur/FileAttente.php +++ b/WEB/View/src/pages/Multijoueur/FileAttente.php @@ -38,60 +38,28 @@

Waiting ...

-
+ - ".$lesJoueurs[0]->getPseudo()."

"; - } - else{ - echo "

Player 1

"; - } - ?> +

Player 1

- - ".$lesJoueurs[1]->getPseudo()."

"; - } - else{ - echo "

Player 2

"; - } - ?> +

Player 2

- - ".$lesJoueurs[2]->getPseudo()."

"; - } - else{ - echo "

Player 3

"; - } - ?> +

Player 3

- - ".$lesJoueurs[3]->getPseudo()."

"; - } - else{ - echo "

Player 3

"; - } - ?> +

Player 4

- + -->