|
|
@ -9,7 +9,15 @@ Votre score est : <h1 id="points"></h1>
|
|
|
|
</br>
|
|
|
|
</br>
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
$database = new SQLite3("data.db");
|
|
|
|
$database = new SQLite3("data.db");
|
|
|
|
$sql='select min(points) from scores where mode="'.$_GET['mode'].'" and diff="'.$_GET['diff'].'"';
|
|
|
|
if(str_contains($_GET['mode'],"p")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sql='select min(points) from scores where mode="'.$_GET['mode'].'" and diff="'.$_GET['diff'].'"';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sql='select max(points) from scores where mode="'.$_GET['mode'].'" and diff="'.$_GET['diff'].'"';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$result = $database->query($sql);
|
|
|
|
$result = $database->query($sql);
|
|
|
|
$a=$result->fetchArray();
|
|
|
|
$a=$result->fetchArray();
|
|
|
|
if($a[0]==null)
|
|
|
|
if($a[0]==null)
|
|
|
@ -25,7 +33,15 @@ else
|
|
|
|
<?php
|
|
|
|
<?php
|
|
|
|
if($_GET['pseudo']!="")
|
|
|
|
if($_GET['pseudo']!="")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if(str_contains($_GET['mode'],"p")
|
|
|
|
|
|
|
|
{
|
|
|
|
$sqlScore='select min(points) from scores where mode="'.$_GET['mode'].'" and diff="'.$_GET['diff'].'" and player="'.$_GET['pseudo'].'"';
|
|
|
|
$sqlScore='select min(points) from scores where mode="'.$_GET['mode'].'" and diff="'.$_GET['diff'].'" and player="'.$_GET['pseudo'].'"';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
$sqlScore='select max(points) from scores where mode="'.$_GET['mode'].'" and diff="'.$_GET['diff'].'" and player="'.$_GET['pseudo'].'"';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$result = $database->query($sqlScore);
|
|
|
|
$result = $database->query($sqlScore);
|
|
|
|
$data = $result->fetchArray()[0];
|
|
|
|
$data = $result->fetchArray()[0];
|
|
|
|
if($data==null)
|
|
|
|
if($data==null)
|
|
|
|