From 682658bc03b96cecb43256fef503f0774622665d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Tue, 10 Jan 2023 08:16:14 +0100 Subject: [PATCH] =?UTF-8?q?3=C3=A8me=20essaie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WEB/View/src/JS/baseMulti.js | 15 -------------- WEB/View/src/pages/Multijoueur/Partie.php | 24 +++++++++++++++++++---- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/WEB/View/src/JS/baseMulti.js b/WEB/View/src/JS/baseMulti.js index 7cf46382..25bb5d75 100644 --- a/WEB/View/src/JS/baseMulti.js +++ b/WEB/View/src/JS/baseMulti.js @@ -128,19 +128,4 @@ function run() { help[i].style.display = "block"; } } - - function saveCode(index, enigmeId) { - console.log("saveCode"); - 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'); - xhr.onload = function () { - // console.log('saveCode'+xhr.responseText); - }; - var searchParams = new URLSearchParams(window.location.search); - xhr.send("code=" + editor.getValue() + "&index=" + index, "&enigmeId=" + enigmeId); - } \ No newline at end of file diff --git a/WEB/View/src/pages/Multijoueur/Partie.php b/WEB/View/src/pages/Multijoueur/Partie.php index 2148dfb2..00efe76b 100644 --- a/WEB/View/src/pages/Multijoueur/Partie.php +++ b/WEB/View/src/pages/Multijoueur/Partie.php @@ -167,10 +167,26 @@ + getNom() . '.js">';