New templates

This commit is contained in:
Quentin Grosyeux 2013-11-04 23:20:16 +01:00
commit 33935063a4
4 changed files with 35 additions and 4 deletions

View file

@ -189,11 +189,15 @@ class Team
return $array;
}
public static function get_top()
public static function get_top($nb=0)
{
$teams = Team::get_teams();
usort($teams, "cmp_team_pts");
if ($nb != 0)
$teams = array_slice($teams, 0, $nb);
return $teams;
}

View file

@ -2,6 +2,17 @@
if(!defined('ONYX')) exit;
//TOP10
$template->assign("top10", Team::get_top(10));
//RANK
$template->assign("my_team", new Team($TEAM));
//BEGIN LISTING THEMES
$template->assign("themes", Theme::get_themes());
$exercice = new Exercice($EXERCICE);
$template->assign("Exercice", $exercice);