mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2024-12-26 18:22:21 +00:00
23 lines
572 B
PHP
23 lines
572 B
PHP
<?php
|
|
|
|
if (!isset($_SESSION["role"]))
|
|
require_once "server_files/403.php";
|
|
|
|
$id = $_GET["id"];
|
|
$user = User::fromId($id);
|
|
|
|
if ($_SESSION["role"] != Role::ADMIN) {
|
|
if ($user->getId() != $_SESSION["user_id"] && ($user->getTeamId() == null || $user->getTeamId() != $_SESSION["user"]->getTeamId()))
|
|
require_once "server_files/403.php";
|
|
}
|
|
|
|
if ($user === null)
|
|
require_once "server_files/404.php";
|
|
|
|
$team = Team::fromId($user->getTeamId());
|
|
|
|
if ($team != null)
|
|
$documents = $user->getAllDocuments($team->getProblem());
|
|
|
|
require_once "server_files/views/informations.php";
|