1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-26 20:07:08 +00:00
plateforme-tfjm2/server_files/views/solutions_orga.php
2019-12-19 13:02:01 +01:00

30 lines
1.0 KiB
PHP

<?php
require_once "server_files/views/header.php";
?>
<div class="mt-4 mb-4">
<h1 class="display-4">Solutions</h1>
</div>
<?php
foreach ($tournaments as $tournament) {
echo "<h1>Tournoi de " . $tournament->getName() . "</h1>\n";
$sols = $tournament->getAllSolutions();
/** @var Solution $sol */
foreach ($sols as $sol) {
$file_id = $sol->getFileId();
$problem = $sol->getProblem();
$version = $sol->getVersion();
$team = Team::fromId($sol->getTeamId());
$team_name = $team->getName();
$team_trigram = $team->getTrigram();
echo "<div class=\"alert alert-info\"><strong>Problème n°$problem de l'équipe $team_name</strong> ($team_trigram), version $version : <a href=\"/file/$file_id\">Télécharger</a></div>";
}
echo "<form method=\"POST\">\n";
echo "<input type=\"hidden\" name=\"tournament\" value=\"" . $tournament->getId() . "\" />\n";
echo "<input class=\"btn btn-lg btn-primary btn-block\" type=\"submit\" name=\"download_zip\" value=\"Télécharger l'archive\" />\n";
echo "</form>\n";
}
require_once "server_files/views/footer.php";