server/onyx/include/team/exercice.php
Li Chen a0657ff619 Merge branch 'master' of ssh://git.nemunai.re:6224/fic2014-server
Conflicts:
	onyx/include/team/exercice.php
	onyx/tpl/bootstrap/teams/exercice.tpl
2013-11-05 04:52:17 +01:00

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";
}