2019-09-02 17:45:28 +00:00
|
|
|
<h1><?= $user_data["first_name"] . " " . $user_data["surname"] ?></h1>
|
|
|
|
|
|
|
|
<?php if ($user_data["role"] == "PARTICIPANT" || $user_data["role"] == "ENCADRANT") { ?>
|
|
|
|
Équipe : <?= $team_data === false ? "Pas d'équipe" : "<a href=\"$URL_BASE/equipe/" . $team_data["trigram"] . "\">" . $team_data["name"] . " (" . $team_data["trigram"] . ")</a>" ?><br />
|
|
|
|
<?php } ?>
|
2019-09-06 11:48:50 +00:00
|
|
|
Date de naissance : <?= echoDate($user_data["birth_date"]) ?><br />
|
2019-09-02 17:45:28 +00:00
|
|
|
Sexe : <?= $user_data["gender"] == "M" ? "Masculin" : "Féminin" ?><br />
|
|
|
|
Adresse : <?= $user_data["address"] . ", " . $user_data["postal_code"] . " " . $user_data["city"] . ($user_data["country"] == "France" ? "" : ", " . $user_data["country"]) ?><br />
|
|
|
|
Adresse e-mail : <a href="mailto:<?= $user_data["email"] ?>"><?= $user_data["email"] ?></a><br />
|
|
|
|
Numéro de téléphone : <?= $user_data["phone_number"] ?><br />
|
|
|
|
|
|
|
|
<?php if ($user_data["role"] == "PARTICIPANT") { ?>
|
|
|
|
Lycée : <?= $user_data["school"] ?><br />
|
|
|
|
Classe : <?php switch ($user_data["class"]) {
|
|
|
|
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 />
|
|
|
|
Nom du responsable légal : <?= $user_data["responsible_name"] ?><br />
|
|
|
|
Numéro de téléphone du responsable légal : <?= $user_data["responsible_phone"] ?><br />
|
|
|
|
Adresse e-mail du responsable légal : <a href="mailto:<?= $user_data["responsible_email"] ?>"><?= $user_data["responsible_email"] ?></a>
|
2019-09-02 19:25:06 +00:00
|
|
|
<?php } elseif ($user_data["description"] != "") { ?>
|
2019-09-02 17:45:28 +00:00
|
|
|
Description : <?= $user_data["description"] ?><br />
|
|
|
|
<?php }
|
|
|
|
|
2019-09-02 19:25:06 +00:00
|
|
|
echo "<hr />";
|
|
|
|
|
2019-09-02 17:45:28 +00:00
|
|
|
if ($user_data["role"] == "ADMIN" || $user_data["role"] == "ORGANIZER") {
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
elseif ($user_data["role"] == "PARTICIPANT" || $user_data["role"] == "ENCADRANT") { ?>
|
|
|
|
<hr />
|
|
|
|
<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
|
|
|
}
|