@ -1,9 +1,11 @@
< head >
< link rel = "stylesheet" type = "text/css" href = "highscores.css" / >
< / head >
< body >
< form action = "highscores.php" method = "post" >
< div id = "modeSelection" >
< img src = "ress/light" id = "light" class = "lightButton" onClick = "switchLight()" / >
< form action = "highscores.php" method = "post" >
< div id = "modeSelection" >
< ul id = "modes" >
< img id = "img_points" class = "button" src = "./ress/button_mode_points.png" / >
@ -44,7 +46,7 @@
< label for = "45s" > < img id = "img_45s" class = "button" src = "./ress/button_survie_45.png" / > < / label >
< / ul >
< / div >
< / div >
< ul id = "diff" class = "all-container" >
< input type = "radio" class = "rad" name = "difficulty" id = "easy" value = "easy" / >
< label for = "easy" > < img id = "img_easy" class = "button" src = "./ress/button_diff_easy.png" / > < / label >
@ -66,24 +68,25 @@
< p > Changer le nombre de points< / p >
< input type = "range" min = "2" max = "8" class = "slider" name = "dotsAmount" id = "range_dots" >
< p > Nombre de points : < span id = "dotsNumber" > < / span > < / p >
< input type = "image" src = "ress/button_highscores.png" alt = "Submit" id = "btn_high" >
< img id = "btn_high_des" src = "ress/button_highscores_desac.png" / >
< / form >
Entrez votre pseudo (optionnel, mais né cessaire si vous voulez sauvegarder votre score): < br / >
< input type = "image" src = "ress/button_highscores.png" alt = "Submit" id = "btn_high" >
< img id = "btn_high_des" src = "ress/button_highscores_desac.png" / >
< / form >
Entrez votre pseudo (optionnel, mais né cessaire si vous voulez sauvegarder votre score): < br / >
< input type = "text" id = "field_pseudo" / > < br / >
< img id = "btn_play" src = "ress/button_play.png" onClick = "play()" / >
< img id = "btn_play_des" src = "ress/button_play_desac.png" / >
< img id = "btn_play" src = "ress/button_play.png" onClick = "play()" / >
< img id = "btn_play_des" src = "ress/button_play_desac.png" / >
< script src = "bakery.js" > < / script >
< script src = "highscore_button_displayer.js" > < / script >
<?php
< script src = "bakery.js" > < / script >
< script src = "highscore_button_displayer.js" > < / script >
< script src = "themeSwitcher.js" > < / script >
<?php
$database = new SQLite3("data.db");
$database = new SQLite3("data.db");
if(isset($_POST["game_mode"]) & & $_POST["game_mode"]!="" & & $_POST["difficulty"]!="" & & $_POST["dotsAmount"]!="" & & $_POST["pause"]!="")
{
if(isset($_POST["game_mode"]) & & $_POST["game_mode"]!="" & & $_POST["difficulty"]!="" & & $_POST["dotsAmount"]!="" & & $_POST["pause"]!="")
{
if(stristr($_POST['game_mode'], "p") === FALSE)
{
$sql='select score, player from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['difficulty'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].' and score=(select min(score) from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['difficulty'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].')';
@ -106,8 +109,11 @@ if(isset($_POST["game_mode"]) && $_POST["game_mode"]!="" && $_POST["difficulty"]
$phrase=$phrase.", ".$row["player"];
}
}
}
echo "< h1 id = 'aya' > ".$phrase."< / h1 > ";
}
?>
}
?>
< script src = "bakery.js" > < / script >
< script src = "themeSwitcher.js" > < / script >
< / body >