forked from vergnet/site-accueil-insa
message contextuel mots croisés
This commit is contained in:
parent
b7edc786e4
commit
07df731755
1 changed files with 15 additions and 2 deletions
17
vacances.php
17
vacances.php
|
@ -34,9 +34,22 @@ if(isset($_POST["team"])){
|
|||
|
||||
?><script type="text/javascript">alert("Félicitation, vous avez fait gagner 500 points à votre équipe !!");</script><?php
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
?><script type="text/javascript">alert("Mauvaise réponse ! (Mouahahaha :D)");</script><?php
|
||||
|
||||
// on teste quand meme si le mot a ete trouve pour afficher un message contextuel
|
||||
$req = $db->prepare("SELECT * FROM mots_croise WHERE name=? AND id=? AND trouve=?");
|
||||
$req->execute(array(htmlspecialchars($_POST["mot"]),(int) $_POST["id_mot"],TRUE));
|
||||
$mot_exist = $req->rowCount();
|
||||
|
||||
if($mot_exist == 1){
|
||||
?><script type="text/javascript">alert("Bonne réponse.. Mais quelqu'un l'a déjà trouvé avant ;)");</script><?php
|
||||
}else{
|
||||
?><script type="text/javascript">alert("Mauvaise réponse ! (Mouahahaha :D)");</script><?php
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,4 +138,4 @@ if($req->rowCount() == 0){
|
|||
<?php
|
||||
$infopage = ["", "Cahier de vacances", ob_get_clean(), "", "vacances","Mots croisés pour vous occuper pendant les vacances"]; //relativepath, pagetitle, pagecontent, pagescript | cf structure/template.php ligne 2 à 6
|
||||
include("structure/template.php");
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue