a0657ff619
Conflicts: onyx/include/team/exercice.php onyx/tpl/bootstrap/teams/exercice.tpl
37 lines
758 B
PHP
37 lines
758 B
PHP
<?php
|
|
|
|
if(!defined('ONYX')) exit;
|
|
|
|
try
|
|
{
|
|
$exercice = new Exercice($EXERCICE);
|
|
|
|
//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());
|
|
|
|
if (!isset($exercice->id))
|
|
return "404";
|
|
|
|
if (!isset($exercice->theme) || $exercice->theme->name != $THEME)
|
|
return "404";
|
|
|
|
$solved = count($exercice->get_solved());
|
|
|
|
$template->assign("Exercice", $exercice);
|
|
$template->assign("team", $TEAM);
|
|
$template->assign("solved", $solved);
|
|
$template->assign("files", $exercice->files);
|
|
|
|
return "teams/exercice";
|
|
}
|
|
catch(Exception $e)
|
|
{
|
|
return "404";
|
|
}
|