forked from vergnet/site-accueil-insa
font vacance et enigme
This commit is contained in:
parent
1e46fcd664
commit
8a8a479705
4 changed files with 86 additions and 19 deletions
|
@ -12,4 +12,42 @@ section {
|
||||||
padding: 50px;
|
padding: 50px;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
margin-top: 40px;
|
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%;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -21,12 +21,40 @@ form {
|
||||||
margin: 20px;
|
margin: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
.input {
|
||||||
width: 50%;
|
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) {
|
@media (max-width: 1500px) {
|
||||||
section {
|
section {
|
||||||
|
display: flex;
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
|
aspect-ratio: auto;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -60,13 +60,13 @@ if(isset($_POST['send'])) {
|
||||||
if($reponse[0]['team'] == NULL) {
|
if($reponse[0]['team'] == NULL) {
|
||||||
?>
|
?>
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<input type="text" placeholder="Réponse à l'énigme" name="answer">
|
<input type="text" placeholder="Réponse à l'énigme" name="answer" class="input">
|
||||||
<select name="team">
|
<select name="team" class="input">
|
||||||
<option value="">Choisissez votre équipe</option>
|
<option value="">Choisissez votre équipe</option>
|
||||||
<option value="pkpeach">PKpeach</option>
|
<option value="pkpeach">PKpeach</option>
|
||||||
<option value="boomario">Boomario</option>
|
<option value="boomario">Boomario</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" name="send" value="Valider votre réponse">
|
<input type="submit" name="send" value="Valider votre réponse" class="submit">
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
|
|
29
vacances.php
29
vacances.php
|
@ -29,11 +29,11 @@ if(isset($_POST['send'])) {
|
||||||
|
|
||||||
|
|
||||||
$req = $db->prepare("SELECT * FROM scores WHERE texte = ?");
|
$req = $db->prepare("SELECT * FROM scores WHERE texte = ?");
|
||||||
$req->execute(array("Mots croisés"));
|
$req->execute(array("Mots croises"));
|
||||||
$req_exist = $req->rowCount();
|
$req_exist = $req->rowCount();
|
||||||
if($req_exist == 0) {
|
if($req_exist == 0) {
|
||||||
if($end) {
|
if($end) {
|
||||||
if(isset($_POST['team']) AND !empy($_POST['team'])) {
|
if(isset($_POST['team']) AND !empty($_POST['team'])) {
|
||||||
|
|
||||||
$team = htmlspecialchars($_POST['team']);
|
$team = htmlspecialchars($_POST['team']);
|
||||||
if($team == "pkpeach") {
|
if($team == "pkpeach") {
|
||||||
|
@ -45,9 +45,7 @@ if(isset($_POST['send'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$req = $db->prepare("INSERT INTO scores(texte, points, team) VALUES(?, ?, ?)");
|
$req = $db->prepare("INSERT INTO scores(texte, points, team) VALUES(?, ?, ?)");
|
||||||
$req->execute(array("Mots croisés","500", $team));
|
$req->execute(array("Mots croises","500", $team));
|
||||||
} else {
|
|
||||||
$error = "veuillez indiquer votre équipe";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,21 +72,28 @@ if(isset($_POST['send'])) {
|
||||||
|
|
||||||
while($r = $req->fetch()) {
|
while($r = $req->fetch()) {
|
||||||
?>
|
?>
|
||||||
<input type="text" name="input<?= $r['id'] ?>" placeholder="<?= $r['id'] ?>" value="<?php if(isset($input[$r['id']])) { echo $input[$r['id']]; } ?>" style="border: 2px solid <?= $color[$r['id']] ?>;"><br>
|
<input type="text" name="input<?= $r['id'] ?>" placeholder="Mot <?= $r['id'] ?>" value="<?php if(isset($input[$r['id']])) { echo $input[$r['id']]; } ?>" style="border: <?= $color[$r['id']] ?>;" class="input">
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if($end) {
|
|
||||||
|
|
||||||
|
$req = $db->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) {
|
||||||
?> <br>
|
?> <br>
|
||||||
Franchement GG à vous, choisissez votre équipe ci-dessous pour lui faire remporter les points :<br>
|
Franchement GG à vous, choisissez votre équipe ci-dessous pour lui faire remporter les points :<br>
|
||||||
<select name="team">
|
<select name="team" class="input">
|
||||||
<option value="">Choisissez votre équipe</option>
|
<option value="">Choisissez votre équipe</option>
|
||||||
<option value="pkpeach">PKpeach</option>
|
<option value="pkpeach">PKpeach</option>
|
||||||
<option value="boomario">Boomario</option>
|
<option value="boomario">Boomario</option>
|
||||||
</select>
|
</select>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?><br>
|
?><br><br>
|
||||||
<input type="submit" name="send" value="Envoyer">
|
<input type="submit" name="send" value="Envoyer" class="submit">
|
||||||
|
|
||||||
<font color="red">
|
<font color="red">
|
||||||
<?php if(isset($error)) {
|
<?php if(isset($error)) {
|
||||||
|
@ -99,10 +104,6 @@ if(isset($_POST['send'])) {
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$req = $db->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) {
|
if($req_exist == 0) {
|
||||||
echo "Aucune des deux équipes n'a réussit à trouver tout les mots";
|
echo "Aucune des deux équipes n'a réussit à trouver tout les mots";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue