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:
@ -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");
|
||||
|
Reference in New Issue
Block a user