2019-09-27 22:12:40 +00:00
|
|
|
<?php
|
|
|
|
|
2019-12-04 10:45:14 +00:00
|
|
|
if (isset($_SESSION["user_id"]) && isset($_SESSION["teams"]) && sizeof($_SESSION["teams"]) > 0) {
|
2019-09-27 22:12:40 +00:00
|
|
|
/**
|
|
|
|
* @var User $user
|
2019-12-04 10:45:14 +00:00
|
|
|
* @var Team team
|
2019-09-27 22:12:40 +00:00
|
|
|
*/
|
|
|
|
$user = $_SESSION["user"];
|
2019-12-04 10:45:14 +00:00
|
|
|
$team = $user->getRole() == Role::PARTICIPANT ? $_SESSION["team"] : Team::fromTrigram($_GET["trigram"]);
|
|
|
|
|
|
|
|
if ($team == null)
|
|
|
|
require_once "server_files/404.php";
|
|
|
|
|
2019-12-13 18:09:14 +00:00
|
|
|
if ($user->getRole() == Role::ENCADRANT && $team->getEncadrantId() != $user->getId())
|
2019-12-04 10:45:14 +00:00
|
|
|
require_once "server_files/403.php";
|
2019-09-27 22:12:40 +00:00
|
|
|
|
|
|
|
$video = Video::getVideo(Reason::SOLUTION, $team);
|
|
|
|
$questions_received = Question::getQuestionsTo($team);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
require_once "server_files/403.php";
|
|
|
|
|
2019-10-06 22:12:23 +00:00
|
|
|
require_once "server_files/views/ma_participation.php";
|