2019-09-09 23:48:52 +00:00
|
|
|
<?php
|
|
|
|
require_once "header.php";
|
|
|
|
|
|
|
|
if ($has_error)
|
|
|
|
echo "<h2>Erreur : " . $error_message . "</h2>";
|
|
|
|
elseif (isset($send_document))
|
2019-09-12 16:47:57 +00:00
|
|
|
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
2019-09-09 23:48:52 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
<h2>Informations sur l'équipe</h2>
|
|
|
|
|
|
|
|
Nom de l'équipe : <?= $team->getName() ?><br/>
|
|
|
|
Trigramme : <?= $team->getTrigram() ?><br/>
|
2019-09-10 23:17:05 +00:00
|
|
|
Problème : <a href=""><?= $team->getProblem() ?></a><br/>
|
2019-09-09 23:48:52 +00:00
|
|
|
<?php
|
2019-09-10 23:17:05 +00:00
|
|
|
if ($team->getEncadrantId() !== null) {
|
|
|
|
$encadrant = User::fromId($team->getEncadrantId());
|
2019-09-09 23:48:52 +00:00
|
|
|
$id = $encadrant->getId();
|
2019-09-10 23:17:05 +00:00
|
|
|
echo "Encadrant : <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
|
2019-09-09 23:48:52 +00:00
|
|
|
}
|
2019-09-12 12:11:59 +00:00
|
|
|
for ($i = 1; $i <= 5; ++$i) {
|
2019-09-09 23:48:52 +00:00
|
|
|
if ($team->getParticipants()[$i - 1] == NULL)
|
|
|
|
continue;
|
|
|
|
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
|
|
|
$id = $participant->getId();
|
|
|
|
echo "Participant $i : <a href=\"$URL_BASE/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
|
|
|
}
|
2019-09-12 16:47:57 +00:00
|
|
|
|
2019-09-09 23:48:52 +00:00
|
|
|
?>
|
|
|
|
Code d'accès : <strong><?= $team->getAccessCode() ?></strong><br/>
|
|
|
|
|
2019-09-12 16:47:57 +00:00
|
|
|
<?php if (date("Y-m-d H:i:s") >= $CONFIG->getInscriptionDate() && $team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<strong>La date limite d'inscription est dépassée, vous ne pouvez plus demander la validation de votre équipe.</strong>
|
|
|
|
<?php } else {
|
|
|
|
if (isset($_GET["modifier"])) { ?>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-12 16:47:57 +00:00
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="team_edit" value="true"/>
|
2019-09-09 23:48:52 +00:00
|
|
|
<table style="width: 100%;">
|
|
|
|
<tbody>
|
2019-09-12 16:47:57 +00:00
|
|
|
<tr>
|
|
|
|
<td style="width: 30%;">
|
|
|
|
<label for="name">Nom :</label>
|
|
|
|
</td>
|
|
|
|
<td style="width: 70%;">
|
|
|
|
<input style="width: 100%;" type="text" id="name" name="name" value="<?= $team->getName() ?>"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2019-09-09 23:48:52 +00:00
|
|
|
<td>
|
2019-09-12 16:47:57 +00:00
|
|
|
<label for="trigram">Trigramme :</label>
|
2019-09-09 23:48:52 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-09-12 16:47:57 +00:00
|
|
|
<input style="width: 100%;" type="text" id="trigram" name="trigram"
|
|
|
|
value="<?= $team->getTrigram() ?>"/>
|
2019-09-09 23:48:52 +00:00
|
|
|
</td>
|
2019-09-12 16:47:57 +00:00
|
|
|
</tr>
|
2019-09-09 23:48:52 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2019-09-12 16:47:57 +00:00
|
|
|
<label for="problem">Problème :</label>
|
2019-09-09 23:48:52 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-09-12 16:47:57 +00:00
|
|
|
<select style="width: 100%;" id="problem" name="problem">
|
|
|
|
<?php
|
|
|
|
for ($i = 1; $i <= 4; ++$i)
|
|
|
|
echo "<option value=\"$i\" " . ($team->getProblem() == $i ? "selected" : "") . ">$i</option>\n";
|
|
|
|
?>
|
|
|
|
</select>
|
2019-09-09 23:48:52 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
2019-09-12 16:47:57 +00:00
|
|
|
<input style="width: 100%;" type="submit" value="Modifier l'équipe"/>
|
2019-09-09 23:48:52 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
2019-09-12 16:47:57 +00:00
|
|
|
|
|
|
|
<?php } else { ?>
|
|
|
|
|
|
|
|
<?php if ($_SESSION["team_validation_status"] == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<!--suppress HtmlUnknownTarget -->
|
|
|
|
<a href="<?= $URL_BASE ?>/mon_equipe/modifier">Modifier mon équipe</a>
|
|
|
|
<?php } ?>
|
2019-09-09 23:48:52 +00:00
|
|
|
<hr/>
|
2019-09-12 16:47:57 +00:00
|
|
|
<h2>Autorisation de droit à l'image</h2>
|
|
|
|
<?php
|
|
|
|
printDocuments($documents);
|
|
|
|
|
|
|
|
if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<hr/>
|
|
|
|
<form method="post" enctype="multipart/form-data">
|
|
|
|
<input type="hidden" name="type" value="photo_consent"/>
|
|
|
|
<table style="width: 100%;">
|
|
|
|
<tbody>
|
|
|
|
<?php /* <tr>
|
|
|
|
<td>
|
|
|
|
<label for="type">Type de document :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<select style="width: 100%;" id="type" name="type">
|
|
|
|
<option value="photo_consent">Autorisation de droit à l'image</option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr> */ ?>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="file">Fichier :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 100%;" type="file" id="file" name="document"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<input style="width: 100%;" type="submit" name="send_document" value="Envoyer le document"/>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</form>
|
|
|
|
<?php } ?>
|
|
|
|
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<hr/>
|
|
|
|
<table style="width: 100%;">
|
|
|
|
<tr>
|
2019-09-09 23:48:52 +00:00
|
|
|
<td style="width: 50%;">
|
|
|
|
<form method="post">
|
2019-09-12 16:47:57 +00:00
|
|
|
<input style="width: 100%;" type="submit" name="leave_team" value="Quitter l'équipe"/>
|
2019-09-09 23:48:52 +00:00
|
|
|
</form>
|
|
|
|
</td>
|
2019-09-12 16:47:57 +00:00
|
|
|
<?php
|
|
|
|
$can_validate = canValidate($team);
|
|
|
|
if ($can_validate) { ?>
|
|
|
|
<td style="width: 50%;">
|
|
|
|
<form method="post">
|
|
|
|
<input style="width: 100%;" type="submit" name="request_validation" value="Demander la validation"/>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
<?php } ?>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<?php } ?>
|
2019-09-09 23:48:52 +00:00
|
|
|
<?php } ?>
|
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php require_once "footer.php" ?>
|