New templates
This commit is contained in:
parent
af58e84324
commit
33935063a4
@ -96,7 +96,7 @@ else
|
|||||||
{
|
{
|
||||||
$TEAM = intval(substr($p[0], 0, strpos($p[0], "-")));
|
$TEAM = intval(substr($p[0], 0, strpos($p[0], "-")));
|
||||||
|
|
||||||
$page = require("public/team.php");
|
$page = require("public/score.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,11 +189,15 @@ class Team
|
|||||||
return $array;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_top()
|
public static function get_top($nb=0)
|
||||||
{
|
{
|
||||||
$teams = Team::get_teams();
|
$teams = Team::get_teams();
|
||||||
|
|
||||||
usort($teams, "cmp_team_pts");
|
usort($teams, "cmp_team_pts");
|
||||||
|
|
||||||
|
if ($nb != 0)
|
||||||
|
$teams = array_slice($teams, 0, $nb);
|
||||||
|
|
||||||
return $teams;
|
return $teams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
if(!defined('ONYX')) exit;
|
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);
|
$exercice = new Exercice($EXERCICE);
|
||||||
|
|
||||||
$template->assign("Exercice", $exercice);
|
$template->assign("Exercice", $exercice);
|
||||||
|
@ -7,13 +7,29 @@
|
|||||||
{block name=content}
|
{block name=content}
|
||||||
<!-- TODO: resolved number -->
|
<!-- TODO: resolved number -->
|
||||||
<div>
|
<div>
|
||||||
<h1>Exercice {$Number} - X</h1>
|
<h1>Exercice 0 - X</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Difficulté : {$Exercice->statement}</li>
|
<li>Difficulté : {$Exercice->statement}</li>
|
||||||
<li>Gain :</li>
|
<li>Gain :</li>
|
||||||
<!-- Dowloads files -->
|
<!-- Dowloads files -->
|
||||||
<li>Description</li>
|
<li>Description</li>
|
||||||
<!-- Input solution -->
|
<!-- Input solution -->
|
||||||
<ul>
|
</ul>
|
||||||
|
|
||||||
|
<ol>
|
||||||
|
{foreach from=$top10 item=team key=pos}
|
||||||
|
<li>{$team->get_name()} <small>({$team->get_pts()})</small></li>
|
||||||
|
{/foreach}
|
||||||
|
</ol>
|
||||||
|
|
||||||
|
<div id="my_team">
|
||||||
|
{$my_team->get_rank(10)}/{Team::get_nbTeams()}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="theme_list">
|
||||||
|
{foreach from=$themes item=theme key=k}
|
||||||
|
<strong>{$theme->get_name()}</strong><br>
|
||||||
|
{$my_team->get_nbResExercisesByTheme($theme->get_id())}/{$theme->get_nbExercices()}<br>
|
||||||
|
{/foreach}
|
||||||
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
|
Loading…
Reference in New Issue
Block a user