score s'affiche entre "consulter" et "jouer"

master
adplantade 5 years ago
parent f65b8f5f29
commit af2f467616

@ -88,23 +88,14 @@
<img id="btn_high_des" src="ress/button_consult_desac.png"/> <img id="btn_high_des" src="ress/button_consult_desac.png"/>
</div> </div>
</form> </form>
<div id="play" class="mode-container">
<!--<div class="texte">
Pseudo :
<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"/>
</div>
</div>
<?php <?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) 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 max(score) from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['difficulty'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].')'; $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 max(score) from score where game_mode="'.$_POST['game_mode'].'" and difficulty="'.$_POST['difficulty'].'" and dots_amount='.$_POST["dotsAmount"].' and pause='.$_POST["pause"].')';
@ -127,15 +118,21 @@
$phrase=$phrase.", ".$row["player"]; $phrase=$phrase.", ".$row["player"];
} }
} }
echo "<h1 id='aya' class='texte' >".$phrase."</h1>"; echo "<h1 id='aya' class='texte' >".$phrase."</h1>";
echo "<input type='hidden' id='modeSel' value='".$_POST["game_mode"]."'/>"; echo "<input type='hidden' id='modeSel' value='".$_POST["game_mode"]."'/>";
echo "<input type='hidden' id='diffSel' value='".$_POST["difficulty"]."'/>"; echo "<input type='hidden' id='diffSel' value='".$_POST["difficulty"]."'/>";
echo "<input type='hidden' id='dotsAmountSel' value='".$_POST["dotsAmount"]."'/>"; echo "<input type='hidden' id='dotsAmountSel' value='".$_POST["dotsAmount"]."'/>";
echo "<input type='hidden' id='pauseSel' value='".$_POST["pause"]."'/>"; echo "<input type='hidden' id='pauseSel' value='".$_POST["pause"]."'/>";
} }
?> ?>
<div id="play" class="mode-container">
<img id="btn_play" src="ress/button_play.png" onClick="play()"/>
<img id="btn_play_des" src="ress/button_play_desac.png"/>
</div>
</div>
<img id="btn_back" src="ress/button_back.png" class="back" onClick="index()"/> <img id="btn_back" src="ress/button_back.png" class="back" onClick="index()"/>

Loading…
Cancel
Save