2019-09-07 11:42:36 +00:00
|
|
|
<?php require_once "header.php" ?>
|
|
|
|
|
2019-12-19 12:02:01 +00:00
|
|
|
<div class="mt-4 mb-4">
|
|
|
|
<h1 class="display-4"><?= $user->getFirstName() . " " . $user->getSurname() ?></h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if (!$has_error) {
|
|
|
|
if (isset($_POST["kick"])) { ?>
|
|
|
|
<div class="alert alert-success">
|
|
|
|
La personne a bien été exclue de l'équipe !
|
|
|
|
</div>
|
|
|
|
<?php } elseif (isset($attribute_team)) { ?>
|
|
|
|
<div class="alert alert-success">
|
|
|
|
La personne a bien rejoint l'équipe !
|
|
|
|
</div>
|
2020-01-14 11:21:18 +00:00
|
|
|
<?php } elseif (isset($validate_payment)) { ?>
|
|
|
|
<div class="alert alert-success">
|
|
|
|
La paiement a bien été validé / rejeté ! Un mail a été transmis au participant.
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
2019-12-19 12:02:01 +00:00
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Rôle :</strong> <?= Role::getTranslatedName($user->getRole()) ?>
|
|
|
|
</div>
|
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) { ?>
|
2019-12-19 12:02:01 +00:00
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Équipe
|
|
|
|
:</strong> <?= $team === null ? "Pas d'équipe" : "<a href=\"/equipe/" . $team->getTrigram() . "\">"
|
|
|
|
. $team->getName() . " (" . $team->getTrigram() . ")</a>" ?>
|
|
|
|
<?php if ($team == null) { ?>
|
|
|
|
<form method="POST">
|
|
|
|
<div class="form-group row">
|
|
|
|
<div class="form-group col-md-12">
|
|
|
|
<label for="team">Attribuer une équipe :</label>
|
|
|
|
<select class="custom-select" id="team" name="team">
|
|
|
|
<option value="no_team">Choisir une équipe ...</option>
|
|
|
|
<?php
|
|
|
|
/** @var Team $t */
|
|
|
|
foreach (Team::getAllTeams(true) as $t) {
|
|
|
|
if ($t->getValidationStatus() != ValidationStatus::NOT_READY)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
$team_name = $t->getName() . " (" . $t->getTrigram() . "), "
|
|
|
|
. ($t->getTournamentId() == 0 ? "pas de tournoi choisi" : "tournoi " . Tournament::fromId($t->getTournamentId())->getName());
|
|
|
|
$team_id = $t->getId();
|
|
|
|
echo "<option value=\"$team_id\">$team_name</option>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<input type="submit" class="btn btn-secondary btn-lg btn-block" name="attribute_team"
|
|
|
|
value="Affecter dans une équipe"/>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<?php } elseif ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="kick"/>
|
2020-01-22 21:06:53 +00:00
|
|
|
<a href="#" onclick="this.parentNode.submit()">Exclure de l'équipe</a>
|
2019-12-19 12:02:01 +00:00
|
|
|
</form>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
2019-09-02 17:45:28 +00:00
|
|
|
<?php } ?>
|
2019-12-19 12:02:01 +00:00
|
|
|
|
2020-01-21 11:43:13 +00:00
|
|
|
<?php
|
|
|
|
if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) {
|
|
|
|
?>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Date de naissance :</strong> <?= formatDate($user->getBirthDate()) ?><br />
|
|
|
|
</div>
|
2019-12-19 12:02:01 +00:00
|
|
|
|
2020-01-21 11:43:13 +00:00
|
|
|
<div class="alert alert-info">
|
2020-02-21 22:26:47 +00:00
|
|
|
<strong>Genre :</strong> <?= $user->getGender() == "M" ? "Masculin" : "Féminin" ?><br />
|
2020-01-21 11:43:13 +00:00
|
|
|
</div>
|
2019-12-19 12:02:01 +00:00
|
|
|
|
2020-01-21 11:43:13 +00:00
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Adresse :</strong> <?= $user->getAddress() . ", " . $user->getPostalCode() . " " . $user->getCity() . ($user->getCountry() == "France" ? "" : ", " . $user->getCountry()) ?><br />
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2019-12-19 12:02:01 +00:00
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Adresse e-mail :</strong> <a href="mailto:<?= $user->getEmail() ?>"><?= $user->getEmail() ?></a><br />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Numéro de téléphone :</strong> <?= $user->getPhoneNumber() ?><br />
|
|
|
|
</div>
|
2019-09-02 17:45:28 +00:00
|
|
|
|
2019-09-06 23:33:05 +00:00
|
|
|
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
2019-12-19 14:05:11 +00:00
|
|
|
<div class="alert alert-info">
|
|
|
|
Lycée : <?= $user->getSchool() ?><br />
|
2020-02-21 22:26:47 +00:00
|
|
|
Classe : <?= SchoolClass::getTranslatedName($user->getClass()) ?>
|
2019-12-19 14:05:11 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
Nom du responsable légal : <?= $user->getResponsibleName() ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
Numéro de téléphone du responsable légal : <?= $user->getResponsiblePhone() ?>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
Adresse e-mail du responsable légal : <a href="mailto:<?= $user->getResponsibleEmail() ?>"><?= $user->getResponsibleEmail() ?></a>
|
|
|
|
</div>
|
|
|
|
|
2020-01-16 21:04:29 +00:00
|
|
|
<?php if ($user->getRole() == Role::PARTICIPANT && $user->getTeamId() > 0) { ?>
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Récapitulatif du paiement :</strong><br /><br />
|
|
|
|
|
|
|
|
<?php if ($payment->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
Cette personne n'a pas encore payé sa participation.
|
2020-01-14 11:21:18 +00:00
|
|
|
</div>
|
|
|
|
<?php } else { ?>
|
2020-01-16 21:04:29 +00:00
|
|
|
<strong>Tournoi :</strong> <?= $tournament->getName() ?><br />
|
|
|
|
<strong>Montant :</strong> <?= $payment->getAmount() ?> €<br />
|
|
|
|
<strong>Moyen de paiement :</strong> <?= PaymentMethod::getTranslatedName($payment->getMethod()) ?><br />
|
|
|
|
<?php if ($payment->getMethod() == PaymentMethod::SCHOLARSHIP) { ?>
|
|
|
|
<strong>Notification de bourse :</strong> <a href="/file/<?= $payment->getTransactionInfos() ?>">Télécharger</a><br /><br />
|
|
|
|
<?php } else { ?>
|
|
|
|
<strong>Informations sur le paiement :</strong> <?= $payment->getTransactionInfos() ?><br /><br />
|
|
|
|
<?php }
|
|
|
|
|
|
|
|
if ($payment->getValidationStatus() == ValidationStatus::WAITING) { ?>
|
|
|
|
<div class="alert alert-warning">
|
|
|
|
Le paiement n'a pas encore été validé.
|
|
|
|
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="validate_payment" value=""/>
|
|
|
|
|
|
|
|
<div class="form-group row">
|
|
|
|
<label for="message">Message à adresser au participant :</label>
|
|
|
|
<textarea class="form-control" id="message" name="message"></textarea>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input class="btn btn-primary btn-lg" style="width: 49%;"
|
|
|
|
type="submit" name="accept" value="Valider le paiement"/>
|
|
|
|
<input class="btn btn-light btn-lg" style="width: 49%;" type="submit" name="reject"
|
|
|
|
value="Rejeter le paiement"/>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<?php } else { ?>
|
|
|
|
<div class="alert alert-success">
|
|
|
|
Le paiement a été validé.
|
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2020-01-14 11:21:18 +00:00
|
|
|
<?php } ?>
|
2020-01-16 21:04:29 +00:00
|
|
|
</div>
|
|
|
|
<?php } ?>
|
2020-01-14 11:21:18 +00:00
|
|
|
|
2019-09-06 23:33:05 +00:00
|
|
|
<?php } elseif ($user->getDescription() != "") { ?>
|
2019-12-19 14:05:11 +00:00
|
|
|
<div class="alert alert-info">
|
|
|
|
Description : <?= $user->getDescription() ?>
|
|
|
|
</div>
|
2019-09-02 17:45:28 +00:00
|
|
|
<?php }
|
|
|
|
|
2019-09-06 23:33:05 +00:00
|
|
|
if ($user->getRole() == Role::ADMIN || $user->getRole() == Role::ORGANIZER) {
|
2020-01-21 11:43:13 +00:00
|
|
|
foreach ($user->getOrganizedTournaments() as $tournament) {
|
2019-12-19 14:05:11 +00:00
|
|
|
echo "<div class=\"alert alert-info\">Organise le tournoi <a href=\"/tournoi/" . $tournament->getName(). "\">" . $tournament->getName() . "</a></div>";
|
2019-09-02 17:45:28 +00:00
|
|
|
}
|
|
|
|
}
|
2019-12-26 21:30:42 +00:00
|
|
|
elseif (($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) && $user->getTeamId() !== NULL) { ?>
|
2019-12-19 14:05:11 +00:00
|
|
|
|
2020-01-22 21:06:53 +00:00
|
|
|
<h2>Documents</h2>
|
2019-09-07 23:35:05 +00:00
|
|
|
<?php
|
|
|
|
printDocuments($documents);
|
|
|
|
|
|
|
|
if ($team->isSelectedForFinal()) { ?>
|
|
|
|
<hr />
|
2020-01-22 21:06:53 +00:00
|
|
|
<h2>Documents pour la finale</h2>
|
2019-09-07 23:35:05 +00:00
|
|
|
<?php
|
|
|
|
printDocuments($documents_final);
|
|
|
|
}
|
2019-09-07 11:42:36 +00:00
|
|
|
}
|
|
|
|
|
2020-01-21 18:22:22 +00:00
|
|
|
if ($_SESSION["role"] == Role::ADMIN) {
|
|
|
|
if ($user->getRole() != Role::ADMIN && $team == null) { ?>
|
|
|
|
<hr/>
|
|
|
|
|
|
|
|
<form method="POST">
|
|
|
|
<input type="submit" name="delete_account" class="btn btn-secondary btn-lg btn-block"
|
|
|
|
style="background-color: #ff2e34" value="Supprimer le compte"/>
|
|
|
|
</form>
|
|
|
|
<?php } ?>
|
2019-12-19 14:05:11 +00:00
|
|
|
<hr />
|
|
|
|
<form method="POST">
|
|
|
|
<input type="submit" name="view_as" class="btn btn-secondary btn-lg btn-block" style="background-color: #2ba42b"
|
|
|
|
value="Afficher le site en tant que <?= $user->getFirstName() . " " . $user->getSurname() ?>"/>
|
|
|
|
</form>
|
|
|
|
<?php }
|
|
|
|
|
2019-09-07 11:42:36 +00:00
|
|
|
require_once "footer.php";
|