diff --git a/lolivator/README.md b/lolivator/README.md new file mode 100644 index 0000000..ad280d9 --- /dev/null +++ b/lolivator/README.md @@ -0,0 +1 @@ +# lolivator diff --git a/lolivator/img/logo.png b/lolivator/img/logo.png new file mode 100644 index 0000000..1a9e35d Binary files /dev/null and b/lolivator/img/logo.png differ diff --git a/lolivator/index.php b/lolivator/index.php new file mode 100644 index 0000000..c3400ad --- /dev/null +++ b/lolivator/index.php @@ -0,0 +1,24 @@ + + + LoLivator - Beta + + + + + +
+ +

Bienvenue sur LoLivator [BETA]

+
+
+
+ + +
+
+ + +
+
+ + \ No newline at end of file diff --git a/lolivator/lazare_buttons.php b/lolivator/lazare_buttons.php new file mode 100644 index 0000000..a27fd3c --- /dev/null +++ b/lolivator/lazare_buttons.php @@ -0,0 +1,30 @@ +Lazare"; +echo "

Nombre de pièces : $nombreDePiecesLazare

"; + +// Fermer la connexion à la base de données +mysqli_close($conn); diff --git a/lolivator/noah_buttons.php b/lolivator/noah_buttons.php new file mode 100644 index 0000000..8697c10 --- /dev/null +++ b/lolivator/noah_buttons.php @@ -0,0 +1,30 @@ +Noah"; +echo "

Nombre de pièces : $nombreDePiecesNoah

"; + +// Fermer la connexion à la base de données +mysqli_close($conn); \ No newline at end of file diff --git a/lolivator/script.js b/lolivator/script.js new file mode 100644 index 0000000..8d98d16 --- /dev/null +++ b/lolivator/script.js @@ -0,0 +1,30 @@ +function addPiece(nomUtilisateur, quantite) { + // Créez une requête XMLHttpRequest pour envoyer une demande au serveur + var xhr = new XMLHttpRequest(); + + // Spécifiez la méthode HTTP (POST) et l'URL du script PHP qui mettra à jour les pièces + xhr.open("POST", "update_pieces.php", true); + + // Définissez le type de données à envoyer (formulaire) + xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + + // Définissez la fonction de rappel pour gérer la réponse du serveur + xhr.onreadystatechange = function() { + if (xhr.readyState === 4 && xhr.status === 200) { + // Mettez à jour l'affichage du nombre de pièces si nécessaire + var response = xhr.responseText; + if (response === "success") { + var elementPieces = document.getElementById("pieces-" + nomUtilisateur); + if (elementPieces) { + var nombreDePieces = parseInt(elementPieces.textContent); + nombreDePieces += quantite; + elementPieces.textContent = nombreDePieces; + } + } + } + }; + + // Envoyez les données au serveur (nom de l'utilisateur et quantité) + var data = "nom=" + encodeURIComponent(nomUtilisateur) + "&quantite=" + encodeURIComponent(quantite); + xhr.send(data); +} diff --git a/lolivator/styles/style.css b/lolivator/styles/style.css new file mode 100644 index 0000000..ccaf063 --- /dev/null +++ b/lolivator/styles/style.css @@ -0,0 +1,66 @@ +body { + background-color: #22445a; + font-family: Arial, Helvetica, sans-serif; + } + +h1.welcome { + padding-left: 25px; +} + +h1 { + color: white; +} + +header { + background-color: #1c4e76; + width: 100%; + height: 100px; + display:flex; + justify-content:center; + border-radius: 10px; +} + +a.login_button { + text-decoration: none; + background-color: rgb(186, 9, 9); + color: white; + display: block; + width: 220px; + height: 65px; + font-size: 32px; + border-style: solid; + border: 10px; + border-color: rgb(124, 0, 0); + border-radius: 10px; + transition: 0.2s; + margin-left: auto; + margin-right: auto; + text-align: center; + text-shadow: #303030; +} + +a:hover { + background-color: rgb(124, 0, 0); + transition: 0.2s; + height: 75px; + width: 230px; +} + +div.login { + margin-top: 250px; + background-color: #303030; + width: 600px; + height: 210px; + justify-content:center; + border-radius: 10px; + margin-left: auto; + margin-right: auto; +} + +h2.type1 { + padding-top: 20px; + color: white; + font-size: 32px; + font-weight: bold; + text-align: center; +} \ No newline at end of file diff --git a/lolivator/update_pieces.php b/lolivator/update_pieces.php new file mode 100644 index 0000000..2f87fa6 --- /dev/null +++ b/lolivator/update_pieces.php @@ -0,0 +1,38 @@ +