Pas d'affichage de description pour qui n'en a pas

This commit is contained in:
Yohann 2019-09-02 21:25:06 +02:00
parent 683b8c71b7
commit 8590d8f730
1 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,7 @@ 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`;");
$tournaments_req = $DB->query("SELECT `tournament`, `name` FROM `organizers` JOIN `tournaments` ON `tournaments`.`id` = `tournament` WHERE `organizer` = $id ORDER BY `date_start`, `name`;");
?>
@ -55,10 +55,12 @@ Numéro de téléphone : <?= $user_data["phone_number"] ?><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>
<?php } else { ?>
<?php } elseif ($user_data["description"] != "") { ?>
Description : <?= $user_data["description"] ?><br />
<?php }
echo "<hr />";
if ($user_data["role"] == "ADMIN" || $user_data["role"] == "ORGANIZER") {
while (($tournament_data = $tournaments_req->fetch()) !== false) {
echo "Organise le tournoi <a href=\"$URL_BASE/tournoi/" . $tournament_data["name"] . "\">" . $tournament_data["name"] . "</a><br />";