forked from vergnet/site-accueil-insa
Compare commits
No commits in common. "1653b0d4d0b106c8e63dbdc66a34160422b61f5b" and "46b5cc3abec9e04b5d5543ce06b98f934c98a2cb" have entirely different histories.
1653b0d4d0
...
46b5cc3abe
5 changed files with 7 additions and 113 deletions
|
|
@ -1,15 +0,0 @@
|
|||
* {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
section {
|
||||
display: block;
|
||||
background-color: rgba(255,255,255,0.3);
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 50px;
|
||||
font-size: 1.2rem;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
section {
|
||||
display: block;
|
||||
background-color: rgba(255,255,255,0.3);
|
||||
width: 80%;
|
||||
max-width: 800px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 50px;
|
||||
font-size: 1.2rem;
|
||||
margin-top: 40px;
|
||||
}
|
||||
77
enigma.php
77
enigma.php
|
|
@ -1,83 +1,6 @@
|
|||
<?php
|
||||
ob_start(); // Start reading html
|
||||
|
||||
include "script/db.php";
|
||||
|
||||
if(isset($_POST['send'])) {
|
||||
if(!empty($_POST['answer']) AND !empty($_POST['team'])) {
|
||||
|
||||
$ans = htmlspecialchars($_POST['answer']);
|
||||
$team = htmlspecialchars($_POST['team']);
|
||||
|
||||
$req = $db->query('SELECT answer, point, team FROM enigma WHERE id = 1'); //id = 1 est la ligne correspondant à l'énigme de la plaquette
|
||||
$reponse = $req -> fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if($reponse[0]['team'] == NULL) {
|
||||
//le "if" ici c'est parce que le 0 => $team = NULL du coup on doit genre faire une conversion relou
|
||||
if($team == "pkpeach") {
|
||||
$team = 0;
|
||||
} elseif($team == "boomario") {
|
||||
$team = 1;
|
||||
} else {
|
||||
header('Refresh: 0');
|
||||
}
|
||||
|
||||
|
||||
if($ans == $reponse[0]['answer']) {
|
||||
$req = $db->prepare("INSERT INTO scores(texte, points, team) VALUES(?, ?, ?)");
|
||||
$req->execute(array("enigme de la plaquette", $reponse[0]['point'], $team));
|
||||
|
||||
$req = $db->prepare("UPDATE enigma SET team = ? WHERE id = 1");
|
||||
$req->execute(array($team));
|
||||
?><script type="text/javascript">alert("Félicitation, vous avez fait gagner <?= $reponse[0]['point'] ?>points à votre équipe");</script><?php
|
||||
} else {
|
||||
$error = "Mauvaise réponse, try again !";
|
||||
}
|
||||
} else {
|
||||
$error = "petit malin, la réponse à déjà été trouvé";
|
||||
}
|
||||
} else {
|
||||
$error = "Il faut remplir tout les champs ;)";
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="box-jaune">
|
||||
<span class="corners corners-top"></span>
|
||||
<span class="corners corners-bottom"></span>
|
||||
|
||||
<div class="title">Enigme de la plaquette</div>
|
||||
|
||||
<span class="circles circles-top"></span>
|
||||
<span class="circles circles-bottom"></span>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<?php
|
||||
$req = $db->query('SELECT team FROM enigma WHERE id = 1'); //id = 1 est la ligne correspondant à l'énigme de la plaquette
|
||||
$reponse = $req -> fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
//var_dump($reponse);
|
||||
if($reponse[0]['team'] == NULL) {
|
||||
?>
|
||||
<form method="POST">
|
||||
<input type="text" placeholder="Réponse à l'énigme" name="answer">
|
||||
<select name="team">
|
||||
<option value="">Choisissez votre équipe</option>
|
||||
<option value="pkpeach">PKpeach</option>
|
||||
<option value="boomario">Boomario</option>
|
||||
</select>
|
||||
<input type="submit" name="send" value="Valider votre réponse">
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
echo "La réponse de l'énigme de la plaquette à déja été trouvé !";
|
||||
}
|
||||
|
||||
if(isset($error)) {
|
||||
echo $error;
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
|
||||
<?php
|
||||
$infopage = ["", "Enigma", ob_get_clean(), "", "enigma"]; //relativepath, pagetitle, pagecontent, pagescript, pagename | cf structure/template.php ligne 2 à 6
|
||||
|
|
|
|||
|
|
@ -144,8 +144,8 @@ if(!isset($relativepath)) {
|
|||
</a>';
|
||||
}
|
||||
$co_y_1 = [-23.5, 25.35,74.2, 123.05, 171.9, 220.75, 269.6, 318.45, 367.3, 416.15, 465];
|
||||
$texte_y_1 = ["", "Photos","Lydia/Izly", "Les clubs", "Prévention", "Com'ville", "Enigme", "", "Download", "Les com's", "Infos"];
|
||||
$lien_y_1 = ["", "photos.php","lydia.php", "clubs.php", "prevs.php", "map_com_ville.php", "enigma.php", "", "downloads.php", "coms.php", "info.php"];
|
||||
$texte_y_1 = ["", "Photos","Lydia/Izly", "Les clubs", "Prévention", "Com'ville", "", "", "Download", "Les com's", "Infos"];
|
||||
$lien_y_1 = ["", "photos.php","lydia.php", "clubs.php", "prevs.php", "map_com_ville.php", "", "", "downloads.php", "coms.php", "info.php"];
|
||||
for($i = 0; $i <= 10; $i++) {
|
||||
echo
|
||||
'<a href="'.$lien_y_1[$i].'" class="menu-link menu-bottom-line">
|
||||
|
|
@ -189,8 +189,8 @@ if(!isset($relativepath)) {
|
|||
}
|
||||
|
||||
$co_y_1 = [-23.5, 25.35,74.2, 123.05, 171.9, 220.75, 269.6, 318.45, 367.3, 416.15, 465];
|
||||
$texte_y_1 = ["Lydia/Izly", "Les clubs", "Prévention", "Com'ville", "Enigme", "", "", "", "Download", "Les com's", "Infos"];
|
||||
$lien_y_1 = ["lydia.php", "clubs.php", "prevs.php", "map_com_ville.php", "enigma.php", "", "", "", "downloads.php", "coms.php", "info.php"];
|
||||
$texte_y_1 = ["Lydia/Izly", "Les clubs", "Prévention", "Com'ville", "", "", "", "", "Download", "Les com's", "Infos"];
|
||||
$lien_y_1 = ["lydia.php", "clubs.php", "prevs.php", "map_com_ville.php", "", "", "", "", "downloads.php", "coms.php", "info.php"];
|
||||
for($i = 0; $i <= 10; $i++) {
|
||||
echo
|
||||
'<a href="'.$lien_y_1[$i].'" class="mobile-menu-link">
|
||||
|
|
|
|||
9
team.php
9
team.php
|
|
@ -23,9 +23,7 @@ if($team === "boomario") {
|
|||
<span class="circles circles-bottom"></span>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit.
|
||||
</section>
|
||||
|
||||
|
||||
<?php
|
||||
} elseif($team === "pkpeach") {
|
||||
|
|
@ -40,9 +38,8 @@ if($team === "boomario") {
|
|||
<span class="circles circles-bottom"></span>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi. Proin porttitor, orci nec nonummy molestie, enim est eleifend mi, non fermentum diam nisl sit amet erat. Duis semper. Duis arcu massa, scelerisque vitae, consequat in, pretium a, enim. Pellentesque congue. Ut in risus volutpat libero pharetra tempor. Cras vestibulum bibendum augue. Praesent egestas leo in pede. Praesent blandit odio eu enim. Pellentesque sed dui ut augue blandit sodales. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Aliquam nibh. Mauris ac mauris sed pede pellentesque fermentum. Maecenas adipiscing ante non diam sodales hendrerit.
|
||||
</section>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue