This repository has been archived on 2025-06-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
server/onyx/include/public/home.php

36 lines
680 B
PHP

<?php
if(!defined('ONYX')) exit;
//TOP10
$teams = Team::get_top();
for ($i = 0; $i < 10; $i++){
echo $teams[$i]->get_name();
echo " (" . $teams[$i]->get_pts() . " pts)<br>";
}
//END TOP10
//RANK
echo "<br><br>";
$t = new Team(10);
echo $t->get_rank() . "/";
echo Team::get_nbTeams();
//END RANK
//BEGIN LISTING THEMES
echo "<br><br>";
$themes = Theme::get_themes();
foreach ($themes as $theme){
echo $theme->get_name()."<br>";
echo $t->get_nbResExercisesByTheme($theme->get_id()) . "/";
echo $theme->get_nbExercices()."<br>";
}
//END LISTING THEMES
$template->assign("teams", Team::get_teams());
$template->assign("top", Team::get_top());
return "public/home";