diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 282812d5..126c193d 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -251,13 +251,13 @@ class UserController $utilisateur = $_SESSION['utilisateur']; $idPartie = $_GET['idPartie']; $index = $_GET['index']; + $dateDebut = $model->getDateDebut($idPartie); $lastIndex = $model->getLastIndex($idPartie); if ($lastIndex != 0 && $index == $lastIndex + 1) { if ($model->checkGameIsEnd($idPartie)) { $this->endGame(); return; } - $dateDebut = $model->getDateDebut($idPartie); $points = $model->getPointsAtTheEnd($utilisateur->getEmail(), $idPartie); require($rep . $vues['lobbyEnd']); } else { diff --git a/WEB/View/src/pages/Multijoueur/Partie.php b/WEB/View/src/pages/Multijoueur/Partie.php index ebd45ddf..8f42fdb8 100644 --- a/WEB/View/src/pages/Multijoueur/Partie.php +++ b/WEB/View/src/pages/Multijoueur/Partie.php @@ -170,7 +170,6 @@ var enigmeId = 'getIdEnigme(); ?>'; console.log("[Savecode]index : " + index, "[Savecode]enigmeId : " + enigmeId); var xhr = new XMLHttpRequest(); - // xhr.open('POST', 'http://localhost/Scripted/WEB/index.php?action=saveCode', true); xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=saveCodeMulti', true); xhr.responseType = 'text'; xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');