forked from halo-battle/game
Ajout d'une page de classement basique
This commit is contained in:
parent
8bb4fdf398
commit
9c353cc6e5
4 changed files with 73 additions and 1 deletions
29
onyx2/include/Class/serveur.php
Normal file
29
onyx2/include/Class/serveur.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
class Serveur
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructeur
|
||||
*
|
||||
* @return void
|
||||
* @access public
|
||||
*/
|
||||
public function Serveur()
|
||||
{
|
||||
return ;
|
||||
}
|
||||
|
||||
public function classement($race = "all")
|
||||
{
|
||||
global $table_user;
|
||||
$bdd = new BDD();
|
||||
$get_race = "";
|
||||
if ($race === "humain" || $race === "covenant") {
|
||||
$get_race = "WHERE race = '$race'";
|
||||
}
|
||||
$classement = $bdd->query("SELECT id, pseudo, place_points, points, race FROM $table_user $get_race ORDER BY place_points ASC LIMIT 100;");
|
||||
$bdd->deconnexion();
|
||||
return $classement;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue