2019-09-06 23:33:05 +00:00
|
|
|
<h1><?= $user->getFirstName() . " " . $user->getSurname() ?></h1>
|
2019-09-02 17:45:28 +00:00
|
|
|
|
2019-09-06 23:33:05 +00:00
|
|
|
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
|
|
|
Équipe : <?= $team === null ? "Pas d'équipe" : "<a href=\"$URL_BASE/equipe/" . $team->getTrigram() . "\">" . $team->getName() . " (" . $team->getTrigram() . ")</a>" ?><br />
|
2019-09-02 17:45:28 +00:00
|
|
|
<?php } ?>
|
2019-09-06 23:33:05 +00:00
|
|
|
Date de naissance : <?= echoDate($user->getBirthDate()) ?><br />
|
|
|
|
Sexe : <?= $user->getGender() == "M" ? "Masculin" : "Féminin" ?><br />
|
|
|
|
Adresse : <?= $user->getAddress() . ", " . $user->getPostalCode() . " " . $user->getCity() . ($user->getCountry() == "France" ? "" : ", " . $user->getCountry()) ?><br />
|
|
|
|
Adresse e-mail : <a href="mailto:<?= $user->getEmail() ?>"><?= $user->getEmail() ?></a><br />
|
|
|
|
Numéro de téléphone : <?= $user->getPhoneNumber() ?><br />
|
2019-09-02 17:45:28 +00:00
|
|
|
|
2019-09-06 23:33:05 +00:00
|
|
|
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
|
|
|
Lycée : <?= $user->getSchool() ?><br />
|
|
|
|
Classe : <?php switch ($user->getClass()) {
|
2019-09-02 17:45:28 +00:00
|
|
|
case "TERMINALE":
|
|
|
|
echo "Terminale";
|
|
|
|
break;
|
|
|
|
case "PREMIERE":
|
|
|
|
echo "Première";
|
|
|
|
break;
|
|
|
|
case "SECONDE":
|
|
|
|
echo "Seconde ou avant";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
echo "A hacké le site";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
?><br />
|
2019-09-06 23:33:05 +00:00
|
|
|
Nom du responsable légal : <?= $user->getResponsibleName() ?><br />
|
|
|
|
Numéro de téléphone du responsable légal : <?= $user->getResponsiblePhone() ?><br />
|
|
|
|
Adresse e-mail du responsable légal : <a href="mailto:<?= $user->getResponsibleEmail() ?>"><?= $user->getResponsibleEmail() ?></a>
|
|
|
|
<?php } elseif ($user->getDescription() != "") { ?>
|
|
|
|
Description : <?= $user->getDescription() ?><br />
|
2019-09-02 17:45:28 +00:00
|
|
|
<?php }
|
|
|
|
|
2019-09-02 19:25:06 +00:00
|
|
|
echo "<hr />";
|
|
|
|
|
2019-09-06 23:33:05 +00:00
|
|
|
if ($user->getRole() == Role::ADMIN || $user->getRole() == Role::ORGANIZER) {
|
2019-09-02 17:45:28 +00:00
|
|
|
while (($tournament_data = $tournaments_req->fetch()) !== false) {
|
2019-09-02 18:08:20 +00:00
|
|
|
echo "Organise le tournoi <a href=\"$URL_BASE/tournoi/" . $tournament_data["name"] . "\">" . $tournament_data["name"] . "</a><br />";
|
2019-09-02 17:45:28 +00:00
|
|
|
}
|
|
|
|
}
|
2019-09-06 23:33:05 +00:00
|
|
|
elseif ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
2019-09-02 17:45:28 +00:00
|
|
|
<h2>Autorisations</h2>
|
|
|
|
<?php
|
|
|
|
while (($data = $documents_req->fetch()) !== false) {
|
|
|
|
$file_id = $data["file_id"];
|
|
|
|
$type = $data["type"];
|
|
|
|
$user_id = $data["user"];
|
|
|
|
$user_data = $DB->query("SELECT `surname`, `first_name` FROM `users` WHERE `id` = '$user_id';")->fetch();
|
|
|
|
$surname = $user_data["surname"];
|
|
|
|
$first_name = $user_data["first_name"];
|
|
|
|
$version = $data["version"];
|
|
|
|
switch ($data["type"]) {
|
|
|
|
case "PARENTAL_CONSENT":
|
|
|
|
$name = "Autorisation parentale";
|
|
|
|
break;
|
|
|
|
case "PHOTO_CONSENT":
|
|
|
|
$name = "Autorisation de droit à l'image";
|
|
|
|
break;
|
|
|
|
case "SANITARY_PLUG":
|
|
|
|
$name = "Fiche sanitaire";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
echo "$name de $first_name $surname : <a href=\"$URL_BASE/file/$file_id\">Télécharger</a><br />";
|
|
|
|
}
|
2019-09-06 11:48:50 +00:00
|
|
|
}
|