diff --git a/WEB/Config/Config.php b/WEB/Config/Config.php index 1589095e..15210945 100644 --- a/WEB/Config/Config.php +++ b/WEB/Config/Config.php @@ -27,6 +27,7 @@ $vues['adminSolo'] = 'View/src/pages/Admin/AdminSolo.php'; $vues['seeOrdre'] = 'View/src/pages/Admin/SeeOrdre.php'; $vues['modifOrdre'] = 'View/src/pages/Admin/ModifOrdre.php'; $vues['partie'] = 'View/src/pages/Multijoueur/Partie.php'; +$vues['queue'] = 'View/src/pages/Multijoueur/Queue.php'; // Enigme $vues['enigme'] = 'View/src/pages/Enigme/Palindrome.html'; $vues['enigmePage'] = 'View/src/pages/Enigme/EnigmePage.php'; diff --git a/WEB/Controller/PartieGateway.php b/WEB/Controller/PartieGateway.php index 0e983213..1230cc56 100644 --- a/WEB/Controller/PartieGateway.php +++ b/WEB/Controller/PartieGateway.php @@ -66,7 +66,8 @@ class PartieGateway $query = "SELECT p.id FROM Partie p, Participer pa WHERE pa.etat=0 - AND pa.partie=p.id"; + AND pa.partie=p.id + LIMIT 1"; $this->con->executeQuery($query); $results = $this->con->getResults(); return $results[0]['id']; diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 0cfd64b6..aaf82c95 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -7,7 +7,7 @@ class UserController try { global $dsn, $rep, $vues, $error; $action = $_REQUEST['action']; - //register_event_handler('add_to_queue',array($this,"onAddToQueue")); + echo $action; switch ($action) { case NULL: $this->goToHome(); @@ -202,29 +202,32 @@ class UserController { try { global $rep, $vues, $error; - //require($rep . $vues['Queue']); + require($rep . $vues['queue']); $model = new UserModel(); $model->addToQueue(); + $userGroup = $model->findUserGroup(); echo - ''; } + public function findUserGroup() : int { + return $this->partie_gateway->findPartieInQueue(); + } + public function launchGame() { $this->utilisateur_gateway->launchGame($_SESSION['utilisateur']); diff --git a/WEB/View/assets/img/BackgroundLogIn.png b/WEB/View/assets/img/BackgroundLogIn.png deleted file mode 100644 index 891bf286..00000000 Binary files a/WEB/View/assets/img/BackgroundLogIn.png and /dev/null differ diff --git a/WEB/View/assets/img/BackgroundMain.jpg b/WEB/View/assets/img/BackgroundMain.jpg deleted file mode 100644 index cc3dd7d4..00000000 Binary files a/WEB/View/assets/img/BackgroundMain.jpg and /dev/null differ diff --git a/WEB/View/assets/img/BackgroundPresentation.jpg b/WEB/View/assets/img/BackgroundPresentation.jpg deleted file mode 100644 index e6e81c31..00000000 Binary files a/WEB/View/assets/img/BackgroundPresentation.jpg and /dev/null differ diff --git a/WEB/View/assets/img/CyberpunkEnigmaCreation.png b/WEB/View/assets/img/CyberpunkEnigmaCreation.png deleted file mode 100644 index 0745b902..00000000 Binary files a/WEB/View/assets/img/CyberpunkEnigmaCreation.png and /dev/null differ diff --git a/WEB/View/assets/img/LoginBG.png b/WEB/View/assets/img/LoginBG.png new file mode 100644 index 00000000..6b439bb7 Binary files /dev/null and b/WEB/View/assets/img/LoginBG.png differ diff --git a/WEB/View/src/CSS/LogSign.css b/WEB/View/src/CSS/Login.css similarity index 84% rename from WEB/View/src/CSS/LogSign.css rename to WEB/View/src/CSS/Login.css index 7d83603f..320cc1a5 100644 --- a/WEB/View/src/CSS/LogSign.css +++ b/WEB/View/src/CSS/Login.css @@ -16,7 +16,7 @@ body { color: white; scroll-behavior: smooth; height: 100vh; - background-image: url("../../assets/img/ImgMain2.png"); + background-image: url("../../assets/img/LoginBG.png"); background-position: center center; background-attachment: fixed; background-repeat: no-repeat; @@ -43,8 +43,9 @@ body { .login-box .user-box input { width: 100%; - padding: 10px 0; - font-size: 16px; + font-family: Verdana, Geneva, Tahoma, sans-serif; + padding: 8px 0; + font-size: 12px; color: #fff; border: none; border-bottom: 1px solid #fff; @@ -70,7 +71,7 @@ body { .login-box .user-box input:valid ~ label { top: -20px; left: 0; - color: #6090d1; + color: #be5631; font-size: 12px; } @@ -80,7 +81,7 @@ body { display: inline-flex; justify-content: center; padding: 10px 0px; - color: #6090d1; + color: #5fc198; background: transparent; border: none; font-size: 16px; @@ -97,11 +98,11 @@ body { .login-box a:hover, .login-box button:hover { - background: #6090d1; + background: #5fc198; color: #fff; border-radius: 5px; - box-shadow: 0 0 5px #6090d1, 0 0 25px #6090d1, 0 0 50px #6090d1, - 0 0 100px #6090d1; + box-shadow: 0 0 5px #5fc198, 0 0 25px #5fc198, 0 0 50px #5fc198, + 0 0 100px #5fc198; } .login-box a span, @@ -116,7 +117,7 @@ body { left: -100%; width: 100%; height: 2px; - background: linear-gradient(90deg, transparent, #6090d1); + background: linear-gradient(90deg, transparent, #5fc198); animation: btn-anim1 1s linear infinite; } @@ -136,7 +137,7 @@ body { right: 0; width: 2px; height: 100%; - background: linear-gradient(180deg, transparent, #6090d1); + background: linear-gradient(180deg, transparent, #5fc198); animation: btn-anim2 1s linear infinite; animation-delay: 0.25s; } @@ -157,9 +158,10 @@ body { right: -100%; width: 100%; height: 2px; - background: linear-gradient(270deg, transparent, #6090d1); + background: linear-gradient(270deg, transparent, #5fc198); animation: btn-anim3 1s linear infinite; animation-delay: 0.5s; + -webkit-animation: btn-anim3 1s linear infinite; } @keyframes btn-anim3 { @@ -178,7 +180,7 @@ body { left: 0; width: 2px; height: 100%; - background: linear-gradient(360deg, transparent, #6090d1); + background: linear-gradient(360deg, transparent, #5fc198); animation: btn-anim4 1s linear infinite; animation-delay: 0.75s; } diff --git a/WEB/View/src/pages/LogSign/Login.php b/WEB/View/src/pages/LogSign/Login.php index 47e17338..b4c78603 100644 --- a/WEB/View/src/pages/LogSign/Login.php +++ b/WEB/View/src/pages/LogSign/Login.php @@ -1,73 +1,52 @@ -
- - - - - - - - - - -