diff --git a/server_files/controllers/informations.php b/server_files/controllers/informations.php index d18589d..2325109 100644 --- a/server_files/controllers/informations.php +++ b/server_files/controllers/informations.php @@ -7,7 +7,7 @@ $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())) + if ($user->getId() != $_SESSION["user_id"]) require_once "server_files/403.php"; } diff --git a/server_files/model.php b/server_files/model.php index b3889c7..444e85f 100644 --- a/server_files/model.php +++ b/server_files/model.php @@ -115,8 +115,7 @@ function canValidate(Team $team) function printDocuments($documents) { - global $URL_BASE; - + echo "
\n"; foreach ($documents as $document) { $file_id = $document->getFileId(); $user = User::fromId($document->getUserId()); @@ -124,8 +123,9 @@ function printDocuments($documents) $first_name = $user->getFirstName(); $name = DocumentType::getTranslatedName($document->getType()); $version = $document->getVersion(); - echo "$name de $first_name $surname (version $version) : Télécharger
"; + echo "$name de $first_name $surname (version $version) : Télécharger
\n"; } + echo "
\n"; } function getZipFile($problem, $team_id = -1) diff --git a/server_files/views/informations.php b/server_files/views/informations.php index 1848c59..5a516db 100644 --- a/server_files/views/informations.php +++ b/server_files/views/informations.php @@ -1,22 +1,33 @@ -

getFirstName() . " " . $user->getSurname() ?>

+
+

getFirstName() . " " . $user->getSurname() ?>

+
getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?> - Équipe : getTrigram() . "\">" . $team->getName() . " (" . $team->getTrigram() . ")" ?>
+
+ Équipe : getTrigram() . "\">" + . $team->getName() . " (" . $team->getTrigram() . ")" ?> +
getRole() == Role::PARTICIPANT) { ?> - Lycée : getSchool() ?>
- Classe : getClass()) ?>
+
+ Lycée : getSchool() ?>
+ Classe : getClass()) ?> +
getDescription() != "") { ?> - Description : getDescription() ?>
+
+ Description : getDescription() ?> +
"; if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?> -

Autorisations

+
+

Autorisation de droit à l'image :

+
getEncadrantId() !== null) { $encadrant = User::fromId($team->getEncadrantId()); $id = $encadrant->getId(); - echo "Encadrant : getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "
"; + if ($_SESSION["role"] == Role::ADMIN) + echo "Encadrant : getFirstName() + . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "
"; + else + echo "Encadrant : " . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "
"; } for ($i = 1; $i <= 5; ++$i) { if ($team->getParticipants()[$i - 1] == NULL) continue; $participant = User::fromId($team->getParticipants()[$i - 1]); $id = $participant->getId(); - echo "Participant $i : getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "
"; + if ($_SESSION["role"] == Role::ADMIN) + echo "Participant $i : getFirstName() + . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "
"; + else + echo "Participant $i : " . $participant->getFirstName() . " " . $participant->getSurname() . "
"; } ?> @@ -93,8 +101,9 @@ require_once "header.php"; -
-

Autorisation de droit à l'image

+
+

Autorisation de droit à l'image

+
-if (isset($join_team) && !$has_error) { ?> - Vous avez bien rejoint l'équipe getName() ?> ! +
+

Rejoindre une équipe

+
+ + +
+ Vous avez bien rejoint l'équipe getName() ?> ! +
= $CONFIG->getInscriptionDate()) { ?> -

La date limite d'inscription est dépassée.

+
+ La date limite d'inscription est dépassée. +
- Erreur : " . $error_message . ""; ?> -
- - - - - - - - - - -
- - - -
- -
+
+
+ + +
+
+ +
+ +