1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-26 18:07:10 +00:00
plateforme-tfjm2/server_files/views/equipe.php

62 lines
2.2 KiB
PHP
Raw Normal View History

<?php require_once "header.php" ?>
2019-09-07 23:35:05 +00:00
<h2>Informations sur l'équipe</h2>
2019-09-06 11:48:50 +00:00
2019-09-07 23:35:05 +00:00
Nom de l'équipe : <?= $team->getName() ?><br/>
Trigramme : <?= $team->getTrigram() ?><br/>
Tournoi : <a href="<?= "/tournoi/" . $tournament->getName() ?>"><?= $tournament->getName() ?></a><br/>
2019-09-06 11:48:50 +00:00
<?php
for ($i = 1; $i <= 2; ++$i) {
if ($team->getEncadrants()[$i] == NULL)
2019-09-06 11:48:50 +00:00
continue;
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
$id = $encadrant->getId();
echo "Encadrant $i : <a href=\"/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
2019-09-06 11:48:50 +00:00
}
for ($i = 1; $i <= 6; ++$i) {
if ($team->getParticipants()[$i - 1] == NULL)
2019-09-06 11:48:50 +00:00
continue;
$participant = User::fromId($team->getParticipants()[$i - 1]);
$id = $participant->getId();
echo "Participant $i : <a href=\"/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
2019-09-06 11:48:50 +00:00
}
if ($team->isSelectedForFinal()) {
$final_name = $FINAL->getName();
echo "<strong>Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</strong>";
2019-09-06 11:48:50 +00:00
}
?>
2019-09-07 23:35:05 +00:00
<hr/>
2019-09-06 11:48:50 +00:00
2019-09-07 23:35:05 +00:00
<h2>Autorisations</h2>
2019-09-06 11:48:50 +00:00
2019-09-07 23:35:05 +00:00
<?php printDocuments($documents) ?>
<form method="POST">
<input style="width: 100%;" type="submit" name="download_zip" value="Télécharger l'archive"/>
</form>
2019-09-06 11:48:50 +00:00
<?php if ($team->isSelectedForFinal()) { ?>
2019-09-07 23:35:05 +00:00
<hr/>
<h2>Autorisations pour la finale</h2>
<?php printDocuments($documents_final) ?>
<form method="POST">
<input style="width: 100%;" type="submit" name="download_zip_final" value="Télécharger l'archive"/>
</form>
<?php } ?>
2019-09-06 11:48:50 +00:00
2019-09-07 23:35:05 +00:00
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
<form method="POST">
<input style="width: 100%;" type="submit" name="validate" value="Valider l'équipe"/>
</form>
2019-09-06 11:48:50 +00:00
<?php
}
2019-09-07 23:35:05 +00:00
if (!$team->isSelectedForFinal() && $_SESSION["role"] == Role::ADMIN) { ?>
<hr/>
<form method="POST">
<input style="width: 100%;" type="submit" name="select" value="Sélectionner pour la finale nationale"/>
</form>
<?php } ?>
<?php require_once "footer.php" ?>