query("SELECT * FROM `users` WHERE `id` = $id;")->fetch();
if ($user_data === false) {
include "../404.php";
}
$team_data = false;
if ($user_data["team_id"] !== NULL)
$team_data = $DB->query("SELECT `name`, `trigram` FROM `teams` WHERE `id` = " . $user_data["team_id"] . ";")->fetch();
$documents_req = $DB->query("SELECT * FROM `documents` WHERE `user` = $id;");
$tournaments_req = $DB->query("SELECT `tournament`, `name` FROM `organizers` JOIN `tournaments` ON `tournaments`.`id` = `tournament` WHERE `organizer` = $id ORDER BY `name`;");
?>
= $user_data["first_name"] . " " . $user_data["surname"] ?>
Équipe : = $team_data === false ? "Pas d'équipe" : "" . $team_data["name"] . " (" . $team_data["trigram"] . ")" ?>
Date de naissance : = echo_date($user_data["birth_date"]) ?>
Sexe : = $user_data["gender"] == "M" ? "Masculin" : "Féminin" ?>
Adresse : = $user_data["address"] . ", " . $user_data["postal_code"] . " " . $user_data["city"] . ($user_data["country"] == "France" ? "" : ", " . $user_data["country"]) ?>
Adresse e-mail : ">= $user_data["email"] ?>
Numéro de téléphone : = $user_data["phone_number"] ?>
Lycée : = $user_data["school"] ?>
Classe :
Nom du responsable légal : = $user_data["responsible_name"] ?>
Numéro de téléphone du responsable légal : = $user_data["responsible_phone"] ?>
Adresse e-mail du responsable légal : ">= $user_data["responsible_email"] ?>
Description : = $user_data["description"] ?>
fetch()) !== false) {
echo "Organise le tournoi " . $tournament_data["name"] . "
";
}
}
elseif ($user_data["role"] == "PARTICIPANT" || $user_data["role"] == "ENCADRANT") { ?>
Autorisations
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 : Télécharger
";
}
} ?>