diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index a1fc969e..bd6b4c53 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -36,6 +36,9 @@ class UserController case "goToEnigme": $this->goToEnigme(); break; + case "goToQueue": + $this->goToQueue(); + break; } } catch (PDOException $e) { @@ -164,4 +167,14 @@ class UserController require($rep.$vues['erreur']); } } + + private function goToQueue() { + global $rep, $vues, $error; + try { + require ($rep.$vues['Queue']); + }catch (Exception $e){ + $error = "404"; + require($rep.$vues['erreur']); + } + } } \ No newline at end of file diff --git a/WEB/Controller/UtilisateurGateway.php b/WEB/Controller/UtilisateurGateway.php index 7304eb32..e9c2ec01 100644 --- a/WEB/Controller/UtilisateurGateway.php +++ b/WEB/Controller/UtilisateurGateway.php @@ -83,7 +83,7 @@ class UtilisateurGateway return $estAdmin; } - public function resoudreEnigmeMulti(string $emailUtilisateur) + /*public function resoudreEnigmeMulti(string $emailUtilisateur) { $query="SELECT c.partie FROM Contenir WHERE c.joueur = :emailUtilisateur @@ -141,7 +141,8 @@ class UtilisateurGateway "partie" => array($idPartie, SQLITE3_INTEGER), "classement" => array($classement, SQLITE3_INTEGER), "index" => array($index, SQLITE3_INTEGER), - "temps" => array($emailUtilisateur, SQLITE3_FLOAT))); + "temps" => array($temps, SQLITE3_FLOAT))); + return array($emailUtilisateur => array($points,$temps)) } else { @@ -155,8 +156,9 @@ class UtilisateurGateway "enigme" => array($idEnigme, SQLITE3_INTEGER), "partie" => array($idPartie, SQLITE3_INTEGER), "classement" => array($classement, SQLITE3_INTEGER))); + return array(); } - } + }*/ public function passerEnigmeMulti(string $emailUtilisateur){ $query="SELECT p.partie FROM Participer