diff --git a/htdocs/index.php b/htdocs/index.php index e385f1b..7d01cf4 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -200,7 +200,9 @@ if (isset($SESS) && !(empty($SESS->values["connected"]) && empty($SESS->values[' case "alliances": include("game/alliance.php"); break; - + case "classement": + include("server/classement.php"); + break; case "rename": include("game/rename.php"); break; diff --git a/onyx2/include/Class/serveur.php b/onyx2/include/Class/serveur.php new file mode 100644 index 0000000..ac844ce --- /dev/null +++ b/onyx2/include/Class/serveur.php @@ -0,0 +1,29 @@ +query("SELECT id, pseudo, place_points, points, race FROM $table_user $get_race ORDER BY place_points ASC LIMIT 100;"); + $bdd->deconnexion(); + return $classement; + } +} diff --git a/onyx2/include/server/classement.php b/onyx2/include/server/classement.php new file mode 100644 index 0000000..0f95f4d --- /dev/null +++ b/onyx2/include/server/classement.php @@ -0,0 +1,19 @@ +classement($race); +$template->assign('joueurs', $classement); +$template->assign('user', $planete->id_user); +$template->assign('raceAff', $race); diff --git a/onyx2/tpl/game/classement.tpl b/onyx2/tpl/game/classement.tpl new file mode 100644 index 0000000..0139053 --- /dev/null +++ b/onyx2/tpl/game/classement.tpl @@ -0,0 +1,22 @@ +{include file='game/header.tpl'} +

Classement

+ +Race : Global - Humains - Covenants + + + + + + + + +{foreach from=$joueurs item=joueur} + + + + + + +{/foreach} +
RangPseudoRacePoints
#{$joueur.place_points}{$joueur.pseudo}{$joueur.race}{$joueur.points}
+{include file='game/footer.tpl'}