1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 03:40:31 +02:00

Support de la finale

This commit is contained in:
Yohann
2019-09-03 00:01:54 +02:00
parent 10da20f2c0
commit 39abeec4e6
10 changed files with 210 additions and 76 deletions

View File

@ -26,7 +26,10 @@ if (isset($_POST["edit_tournament"])) {
$error_message = updateTournament();
}
$teams_response = $DB->query("SELECT `id`, `name`, `trigram`, `inscription_date`, `validation_status` FROM `teams` WHERE `tournament` = " . $data["id"] . " AND `year` = $YEAR;");
if ($data["final"])
$teams_response = $DB->query("SELECT `id`, `name`, `trigram`, `inscription_date`, `validation_status` FROM `teams` WHERE `final_selection` AND `year` = $YEAR;");
else
$teams_response = $DB->query("SELECT `id`, `name`, `trigram`, `inscription_date`, `validation_status` FROM `teams` WHERE `tournament` = " . $data["id"] . " AND `year` = $YEAR;");
$orgas_response = $DB->query("SELECT `id`, `surname`, `first_name` FROM `users` WHERE (`role` = 'ORGANIZER' OR `role` = 'ADMIN') AND `year` = '$YEAR';");
@ -152,6 +155,10 @@ function updateTournament() {
<strong>Date limite d'envoi des solutions :</strong> <?php echo echo_date($data["date_solutions"], true) ?><br />
<strong>Date limite d'envoi des notes de synthèse :</strong> <?php echo echo_date($data["date_syntheses"], true) ?><br />
<strong>Description :</strong> <?php echo $data["description"] ?><br />
<?php
if ($data["final"])
echo "<strong>Ce tournoi est la finale nationale du TFJM² 2020.</strong><br />";
?>
<?php if (!isset($_GET["modifier"]) && ($_SESSION["role"] == "ADMIN" || $_SESSION["role"] == "ORGANIZER" && in_array($_SESSION["user_id"], $orgas_id))) { ?>
<a href="<?= $URL_BASE ?>/tournoi/<?= $data["name"] ?>/modifier">Éditer le tournoi</a>