1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-07-02 07:58:32 +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

@ -41,11 +41,18 @@ if (isset($_SESSION["user_id"])) {
}
if (isset($_SESSION["user_id"]) && isset($_SESSION["team_id"]) && $_SESSION["team_id"] != NULL) {
$response = $DB->query("SELECT `tournament`, `validation_status` FROM `teams` WHERE `id` ='" . $_SESSION["team_id"] . "' AND `year` = '$YEAR';");
$response = $DB->query("SELECT `tournament`, `validation_status`, `final_selection` FROM `teams` WHERE `id` ='" . $_SESSION["team_id"] . "' AND `year` = '$YEAR';");
$data = $response->fetch();
$_SESSION["tournament_id"] = $data["tournament"];
$_SESSION["team_validation_status"] = $data["validation_status"];
}
if ((isset($data["final_selection"]) && $data["final_selection"]) || $_SESSION["role"] == "ADMIN" || $_SESSION["role"] == "ORGANIZER") {
$response = $DB->query("SELECT `id`, `name` FROM `tournaments` WHERE `final` AND `year` = $YEAR;");
$data = $response->fetch();
$_SESSION["final_id"] = $data["id"];
$_SESSION["final_name"] = $data["name"];
}
}
setlocale(LC_ALL, "fr_FR.utf8");