From 8a8a479705cee3023813e088a8887c003ef17f88 Mon Sep 17 00:00:00 2001 From: Baptiste Date: Mon, 13 Jun 2022 18:41:47 +0200 Subject: [PATCH] font vacance et enigme --- assets/css/page/enigma.css | 38 ++++++++++++++++++++++++++++++++++++ assets/css/page/vacances.css | 32 ++++++++++++++++++++++++++++-- enigma.php | 6 +++--- vacances.php | 29 ++++++++++++++------------- 4 files changed, 86 insertions(+), 19 deletions(-) diff --git a/assets/css/page/enigma.css b/assets/css/page/enigma.css index 7e22cd5..bfcd4fa 100644 --- a/assets/css/page/enigma.css +++ b/assets/css/page/enigma.css @@ -12,4 +12,42 @@ section { padding: 50px; font-size: 1.2rem; margin-top: 40px; +} + +.input { + width: 50%; + background-color: white; + border: 3px solid grey; + border-radius: 4px; + text-align: center; + height: 50px; + margin: 10px; + font-weight: bold; +} + +.submit { + width: 50%; + background-color: grey; + border: 3px solid grey; + color: white; + border-radius: 4px; + text-align: center; + height: 50px; + margin: 10px; + font-weight: bold; +} + +.submit:hover { + transition: 0.3s ease; + transform: scale(1.05); +} + +@media (max-width: 700px) { + .submit { + width: 80%; + } + + .input { + width: 80%; + } } \ No newline at end of file diff --git a/assets/css/page/vacances.css b/assets/css/page/vacances.css index 4de929a..38f073c 100644 --- a/assets/css/page/vacances.css +++ b/assets/css/page/vacances.css @@ -21,12 +21,40 @@ form { margin: 20px; } -input { - width: 50%; +.input { + display: inline-block; + width: 35%; + background-color: white; + border: 3px solid grey; + border-radius: 4px; + text-align: center; + height: 30px; + margin: 5px; } +.submit { + width: 50%; + background-color: grey; + border: 3px solid grey; + color: white; + border-radius: 4px; + text-align: center; + height: 30px; + margin: 5px; + font-weight: bold; +} + +.submit:hover { + transition: 0.3s ease; + transform: scale(1.05); +} + + @media (max-width: 1500px) { section { + display: flex; width: 90vw; + aspect-ratio: auto; + height: auto; } } \ No newline at end of file diff --git a/enigma.php b/enigma.php index 6f6862e..02476e6 100644 --- a/enigma.php +++ b/enigma.php @@ -60,13 +60,13 @@ if(isset($_POST['send'])) { if($reponse[0]['team'] == NULL) { ?>
- - + - +
prepare("SELECT * FROM scores WHERE texte = ?"); - $req->execute(array("Mots croisés")); + $req->execute(array("Mots croises")); $req_exist = $req->rowCount(); if($req_exist == 0) { if($end) { - if(isset($_POST['team']) AND !empy($_POST['team'])) { + if(isset($_POST['team']) AND !empty($_POST['team'])) { $team = htmlspecialchars($_POST['team']); if($team == "pkpeach") { @@ -45,9 +45,7 @@ if(isset($_POST['send'])) { } $req = $db->prepare("INSERT INTO scores(texte, points, team) VALUES(?, ?, ?)"); - $req->execute(array("Mots croisés","500", $team)); - } else { - $error = "veuillez indiquer votre équipe"; + $req->execute(array("Mots croises","500", $team)); } } } @@ -74,21 +72,28 @@ if(isset($_POST['send'])) { while($r = $req->fetch()) { ?> -
+ prepare("SELECT team FROM scores WHERE texte = ?"); + $req->execute(array("Mots croises")); + $req_exist = $req->rowCount(); + $team_gg = $req -> fetchAll(PDO::FETCH_ASSOC); + + if($end AND $req_exist == 0) { ?>
Franchement GG à vous, choisissez votre équipe ci-dessous pour lui faire remporter les points :
-
- + ?>

+
prepare("SELECT team FROM scores WHERE texte = ?"); - $req->execute(array("Mots croises")); - $req_exist = $req->rowCount(); - $team_gg = $req -> fetchAll(PDO::FETCH_ASSOC); if($req_exist == 0) { echo "Aucune des deux équipes n'a réussit à trouver tout les mots"; } else {