Merge branch 'master' of https://codefirst.iut.uca.fr/git/nathan.boileau/Scripted
continuous-integration/drone/push Build is failing Details

ServeurDeTest
nathan boileau 2 years ago
commit 581e237628

@ -130,9 +130,12 @@ class UserModel
if ($leClassement[0] == 0){
$classement = 1;
}
else{
else if ($leClassement[$playerNumberPerGame] != null){
$classement = 3;
}
else {
$classement = 2;
}
// if ($result == 0){
// $classement = 1;
// }

@ -132,7 +132,7 @@ function displayHelp() {
function saveCode() {
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=saveCode', true);
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=saveCode', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onload = function () {

@ -132,7 +132,7 @@ function run() {
function saveCode() {
var xhr = new XMLHttpRequest();
// xhr.open('POST', 'http://localhost/Scripted/WEB/index.php?action=saveCodeInCookie', true);
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=saveCodeInCookie', true);
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=saveCodeInCookie', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onload = function () {

@ -70,13 +70,13 @@
function checkIsReady() {
console.log("checkIsReady");
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=waiting', true);
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=waiting', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onload = function () {
console.log(xhr.responseText);
if (xhr.responseText == "1") {
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=goToGame&idPartie=' + <?php echo $_SESSION['idPartie'] ?> + '&index=1'
window.location.href = 'http://82.165.180.114/Scripted/index.php?action=goToGame&idPartie=' + <?php echo $_SESSION['idPartie'] ?> + '&index=1'
}
};
xhr.send(null);

@ -34,12 +34,12 @@
<script>
function checkIsEnd() {
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=getGameEtat', true);
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getGameEtat', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onload = function () {
if (xhr.responseText == "2") {
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=endGame'
window.location.href = 'http://82.165.180.114/Scripted/index.php?action=endGame'
}
};
xhr.send(null);
@ -59,7 +59,7 @@
document.getElementById('countdown').innerHTML = hours + " heures " + minutes + " minutes " + remainingSeconds + " secondes";
if (seconds == 0) {
clearInterval(countdown);
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=endGame'
window.location.href = 'http://82.165.180.114/Scripted/index.php?action=endGame'
} else {
seconds--;
}

@ -178,7 +178,7 @@
var enigmeId = '<?php echo $enigme->getIdEnigme(); ?>';
console.log("[Savecode]index : " + index, "[Savecode]enigmeId : " + enigmeId);
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=saveCodeMulti', true);
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=saveCodeMulti', true);
xhr.responseType = 'text';
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.onload = function () {
@ -203,7 +203,7 @@
document.getElementById('countdown').innerHTML = hours + " heures " + minutes + " minutes " + remainingSeconds + " secondes";
if (seconds == 0) {
clearInterval(countdown);
window.location.href = 'http://82.165.180.114/Scripted/WEB/index.php?action=endGame'
window.location.href = 'http://82.165.180.114/Scripted/index.php?action=endGame'
} else {
seconds--;
}

Loading…
Cancel
Save