2019-09-09 23:48:52 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!isset($_SESSION["role"]))
|
|
|
|
require_once "server_files/403.php";
|
|
|
|
|
|
|
|
$id = $_GET["id"];
|
|
|
|
$user = User::fromId($id);
|
|
|
|
|
2019-09-11 16:41:45 +00:00
|
|
|
if ($_SESSION["role"] != Role::ADMIN) {
|
2019-09-09 23:48:52 +00:00
|
|
|
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());
|
|
|
|
|
2019-09-12 10:18:15 +00:00
|
|
|
if ($team != null)
|
2019-09-11 16:41:45 +00:00
|
|
|
$documents = $user->getAllDocuments($team->getProblem());
|
2019-09-09 23:48:52 +00:00
|
|
|
|
|
|
|
require_once "server_files/views/informations.php";
|