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

ServeurDeTest
Noé GARNIER 2 years ago
parent a81a036789
commit 08d73a098b

@ -247,6 +247,7 @@ class UserController
$idPartie = $_GET['idPartie'];
$index = $_GET['index'];
$lastIndex = $model->getLastIndex($idPartie);
echo $lastIndex;
if ($lastIndex != 0 && $index == $lastIndex + 1) {
if ($model->checkGameIsEnd($idPartie)) {
$this->endGame();

@ -33,13 +33,11 @@
</div>
<script>
function checkIsEnd() {
console.log("checkIsEnd");
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=getGameEtat', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onload = function () {
console.log(xhr.responseText);
if (xhr.responseText == "2") {
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=endGame'
}

@ -53,7 +53,7 @@ PRIMARY KEY(utilisateur, enigme, partie)
CREATE TABLE Contenir(
partie int REFERENCES Partie(id),
enigme int REFERENCES Enigme(id),
indexEnigme numeric UNIQUE,
indexEnigme numeric ,
PRIMARY KEY(partie, enigme)
);

Loading…
Cancel
Save