You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
134 lines
6.1 KiB
134 lines
6.1 KiB
<head>
|
|
<link rel="stylesheet" type="text/css" href="highscores.css"/>
|
|
</head>
|
|
|
|
<form action="highscores.php" method="post">
|
|
<p>difficulty : <input type="text" name="diff" /></p>
|
|
<p>dotsAmount : <input type="text" name="dotsAmount" /></p>
|
|
<p>pause : <input type="text" name="pause" /></p>
|
|
<div id="modeSelection">
|
|
<ul id="modes">
|
|
<img id="img_points" class="button" src="./ress/button_mode_points.png"/>
|
|
|
|
<img id="img_temps" class="button" src="./ress/button_mode_temps.png"/>
|
|
|
|
<img id="img_survie" class="button" src="./ress/button_mode_survie.png"/>
|
|
</ul>
|
|
<ul id="points" class="all-container">
|
|
<input type="radio" name="game_mode" id="5p" value="5p" />
|
|
<label for="5p"><img id="img_5p" class="button" src="./ress/button_points_5.png"/></label>
|
|
|
|
<input type="radio" name="game_mode" id="10p" value="10p"/>
|
|
<label for="10p"><img id="img_10p" class="button" src="./ress/button_points_10.png"/></label>
|
|
|
|
<input type="radio" name="game_mode" id="15p" value="15p" />
|
|
<label for="15p"><img id="img_15p" class="button" src="./ress/button_points_15.png"/></label>
|
|
|
|
<input type="radio" name="game_mode" id="20p" value="20p" />
|
|
<label for="20p"><img id="img_20p" class="button" src="./ress/button_points_20.png"/></label>
|
|
|
|
</ul>
|
|
<ul id="temps" class="all-container">
|
|
<input type="radio" name="game_mode" id="5m" value="5m" />
|
|
<label for="5m"><img id="img_5m" class="button" src="./ress/button_temps_5.png"/></label>
|
|
|
|
<input type="radio" name="game_mode" id="10m" value="10m"/>
|
|
<label for="10m"><img id="img_10m" class="button" src="./ress/button_temps_10.png"/></label>
|
|
|
|
</ul>
|
|
<ul id="survie" class="all-container">
|
|
<input type="radio" name="game_mode" id="15s" value="15s"/>
|
|
<label for="15s"><img id="img_15s" class="button" src="./ress/button_survie_15.png"/></label>
|
|
|
|
<input type="radio" name="game_mode" id="30s" value="30s" />
|
|
<label for="30s"><img id="img_30s" class="button" src="./ress/button_survie_30.png"/></label>
|
|
|
|
<input type="radio" name="game_mode" id="45s" value="45s" />
|
|
<label for="45s"><img id="img_45s" class="button" src="./ress/button_survie_45.png"/> </label>
|
|
|
|
</ul>
|
|
</div>
|
|
<input type="image" src="ress/red.png" alt="Submit" width="48" height="48">
|
|
</form>
|
|
<!--
|
|
<form action="#">
|
|
|
|
<input type="radio" name="radio-choice2" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<input type="radio" name="radio-choice2" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<input type="radio" name="radio-choice2" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<input type="radio" name="radio-choice2" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<input type="radio" name="radio-choice3" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<input type="radio" name="radio-choice3" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<input type="radio" name="radio-choice3" id="radio-choice-2" />
|
|
<label for="radio-choice-2"><img id="img_temps" class="button" src="./ress/button_mode_temps.png"/></label>
|
|
|
|
<div>
|
|
<input type="submit" value="Valider" />
|
|
</div>
|
|
</form>
|
|
|
|
<div id="modeSelection">
|
|
<ul id="modes" class="all-container">
|
|
|
|
|
|
<img id="img_survie" class="button" src="./ress/button_mode_survie.png"/>
|
|
</ul>
|
|
<ul id="points" class="all-container">
|
|
<img id="img_5p" class="button" src="./ress/button_points_5.png"/>
|
|
<img id="img_10p" class="button" src="./ress/button_points_10.png"/>
|
|
<img id="img_15p" class="button" src="./ress/button_points_15.png"/>
|
|
<img id="img_20p" class="button" src="./ress/button_points_20.png"/>
|
|
</ul>
|
|
<ul id="temps" class="all-container">
|
|
<img id="img_5m" class="button" src="./ress/button_temps_5.png"/>
|
|
<img id="img_10m" class="button" src="./ress/button_temps_10.png"/>
|
|
</ul>
|
|
<ul id="survie" class="all-container">
|
|
<img id="img_15s" class="button" src="./ress/button_survie_15.png"/>
|
|
<img id="img_30s" class="button" src="./ress/button_survie_30.png"/>
|
|
<img id="img_45s" class="button" src="./ress/button_survie_45.png"/>
|
|
</ul>
|
|
</div>
|
|
<ul id="diff" class="all-container">
|
|
<img id="img_easy" class="button" src="./ress/button_diff_easy.png"/>
|
|
<img id="img_med" class="button" src="./ress/button_diff_normal.png"/>
|
|
<img id="img_hard" class="button" src="./ress/button_diff_hard.png"/>
|
|
</ul>
|
|
|
|
-->
|
|
<script src="highscore_button_displayer.js"></script>
|
|
<?php
|
|
|
|
$database = new SQLite3("data.db");
|
|
|
|
|
|
|
|
if($_POST["game_mode"]!="" && $_POST["diff"]!="" && $_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['diff'].'" 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['diff'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].')';
|
|
}
|
|
else
|
|
{
|
|
$sql='select score, player from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['diff'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].' and score=(select max(score) from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['diff'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].')';
|
|
}
|
|
|
|
$result = $database->query($sql);
|
|
$a=$result->fetchArray();
|
|
|
|
echo "<h1 id='aya'>".print_r($a)."</h1>";
|
|
echo "<h1 id='aye'>".var_dump($_POST)."</h1>";
|
|
} |