mirror of
				https://gitlab.com/animath/si/plateforme-corres2math.git
				synced 2025-11-04 00:52:06 +01:00 
			
		
		
		
	Design page "Mon équipe"
This commit is contained in:
		@@ -1,89 +1,97 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
require_once "header.php";
 | 
					require_once "header.php";
 | 
				
			||||||
 | 
					 | 
				
			||||||
if (!$has_error && isset($send_document))
 | 
					 | 
				
			||||||
	echo "<h2>Le fichier a été correctement envoyé !</h2>";
 | 
					 | 
				
			||||||
?>
 | 
					?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <h2>Informations sur l'équipe</h2>
 | 
					    <div class="mt-4 mb-4">
 | 
				
			||||||
 | 
					        <h1 class="display-4">Mon équipe</h1>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Nom de l'équipe : <?= $team->getName() ?><br/>
 | 
					<?php if (!$has_error && isset($send_document)) { ?>
 | 
				
			||||||
    Trigramme : <?= $team->getTrigram() ?><br/>
 | 
					    <div class="alert alert-success">
 | 
				
			||||||
    Problème : <a href="/probleme/<?= $team->getProblem() ?>"><?= $team->getProblem() ?></a><br/>
 | 
					        Le fichier a été correctement envoyé !
 | 
				
			||||||
<?php
 | 
					    </div>
 | 
				
			||||||
if ($team->getEncadrantId() !== null) {
 | 
					<?php } ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <div class="alert alert-info">
 | 
				
			||||||
 | 
					        <strong>Nom de l'équipe :</strong> <?= $team->getName() ?>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="alert alert-info">
 | 
				
			||||||
 | 
					        <strong>Trigramme :</strong> <?= $team->getTrigram() ?>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="alert alert-info">
 | 
				
			||||||
 | 
					        <strong>Problème :</strong> <a href="/probleme/<?= $team->getProblem() ?>"><?= $team->getProblem() ?></a>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="alert alert-info">
 | 
				
			||||||
 | 
							<?php
 | 
				
			||||||
 | 
							if ($team->getEncadrantId() !== null) {
 | 
				
			||||||
			$encadrant = User::fromId($team->getEncadrantId());
 | 
								$encadrant = User::fromId($team->getEncadrantId());
 | 
				
			||||||
			$id = $encadrant->getId();
 | 
								$id = $encadrant->getId();
 | 
				
			||||||
	echo "Encadrant : <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
 | 
								echo "<strong>Encadrant :</strong> <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
 | 
				
			||||||
}
 | 
							}
 | 
				
			||||||
for ($i = 1; $i <= 5; ++$i) {
 | 
							for ($i = 1; $i <= 5; ++$i) {
 | 
				
			||||||
			if ($team->getParticipants()[$i - 1] == NULL)
 | 
								if ($team->getParticipants()[$i - 1] == NULL)
 | 
				
			||||||
				continue;
 | 
									continue;
 | 
				
			||||||
			$participant = User::fromId($team->getParticipants()[$i - 1]);
 | 
								$participant = User::fromId($team->getParticipants()[$i - 1]);
 | 
				
			||||||
			$id = $participant->getId();
 | 
								$id = $participant->getId();
 | 
				
			||||||
	echo "Participant $i : <a href=\"$URL_BASE/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
 | 
								echo "<strong>Participant $i :</strong> <a href=\"$URL_BASE/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
 | 
				
			||||||
}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
?>
 | 
							?>
 | 
				
			||||||
    Code d'accès : <strong><?= $team->getAccessCode() ?></strong><br/>
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="alert alert-info">
 | 
				
			||||||
 | 
					        Code d'accès : <strong><?= $team->getAccessCode() ?></strong>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="alert alert-info">
 | 
				
			||||||
        <!--suppress HtmlUnknownTarget -->
 | 
					        <!--suppress HtmlUnknownTarget -->
 | 
				
			||||||
        Autorise Animath à diffuser mes vidéos : <?= $team->allowPublish() ? "oui" : "non" ?> (<a
 | 
					        Autorise Animath à diffuser mes vidéos : <?= $team->allowPublish() ? "oui" : "non" ?> (<a
 | 
				
			||||||
        href="/mon-equipe/diffusion-videos">changer</a>)<br/>
 | 
					                href="/mon-equipe/diffusion-videos">changer</a>)
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<?php if (date("Y-m-d H:i:s") >= $CONFIG->getInscriptionDate() && $team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
 | 
					<?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
 | 
					    <div class="alert alert-danger">
 | 
				
			||||||
        équipe.</strong>
 | 
					        La date limite d'inscription est dépassée, vous ne pouvez plus demander la validation de votre équipe.
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
<?php } else {
 | 
					<?php } else {
 | 
				
			||||||
	if (isset($_GET["modifier"])) { ?>
 | 
						if (isset($_GET["modifier"])) { ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <form method="POST">
 | 
					        <form method="POST">
 | 
				
			||||||
            <input type="hidden" name="team_edit" value="true"/>
 | 
					            <div class="form-row">
 | 
				
			||||||
            <table >
 | 
					                <div class="form-group col-md-6">
 | 
				
			||||||
                <tbody>
 | 
					 | 
				
			||||||
                <tr>
 | 
					 | 
				
			||||||
                    <td style="width: 30%;">
 | 
					 | 
				
			||||||
                    <label for="name">Nom :</label>
 | 
					                    <label for="name">Nom :</label>
 | 
				
			||||||
                    </td>
 | 
					                    <input class="form-control" type="text" id="name" name="name"
 | 
				
			||||||
                    <td style="width: 70%;">
 | 
					                           value="<?= $team->getName() ?>" required/>
 | 
				
			||||||
                        <input type="text" id="name" name="name" value="<?= $team->getName() ?>"/>
 | 
					                </div>
 | 
				
			||||||
                    </td>
 | 
					
 | 
				
			||||||
                </tr>
 | 
					                <div class="form-group col-md-6">
 | 
				
			||||||
                <tr>
 | 
					 | 
				
			||||||
                    <td>
 | 
					 | 
				
			||||||
                    <label for="trigram">Trigramme :</label>
 | 
					                    <label for="trigram">Trigramme :</label>
 | 
				
			||||||
                    </td>
 | 
					                    <input class="form-control" type="text" id="trigram" name="trigram"
 | 
				
			||||||
                    <td>
 | 
					                           value="<?= $team->getTrigram() ?>" pattern="[A-Z]{3}" maxlength="3" required/>
 | 
				
			||||||
                        <input type="text" id="trigram" name="trigram"
 | 
					                </div>
 | 
				
			||||||
                               value="<?= $team->getTrigram() ?>"/>
 | 
					            </div>
 | 
				
			||||||
                    </td>
 | 
					
 | 
				
			||||||
                </tr>
 | 
					            <div class="form-group row">
 | 
				
			||||||
                <tr>
 | 
					 | 
				
			||||||
                    <td>
 | 
					 | 
				
			||||||
                <label for="problem">Problème :</label>
 | 
					                <label for="problem">Problème :</label>
 | 
				
			||||||
                    </td>
 | 
					                <select id="problem" name="problem" class="custom-select">
 | 
				
			||||||
                    <td>
 | 
					 | 
				
			||||||
                        <select id="problem" name="problem">
 | 
					 | 
				
			||||||
					<?php
 | 
										<?php
 | 
				
			||||||
					for ($i = 1; $i <= 4; ++$i)
 | 
										for ($i = 1; $i <= 4; ++$i)
 | 
				
			||||||
								echo "<option value=\"$i\" " . ($team->getProblem() == $i ? "selected" : "") . ">$i</option>\n";
 | 
											echo "<option value='$i' " . ($team->getProblem() == $i ? "selected" : "") . ">$i</option>";
 | 
				
			||||||
					?>
 | 
										?>
 | 
				
			||||||
                </select>
 | 
					                </select>
 | 
				
			||||||
                    </td>
 | 
					            </div>
 | 
				
			||||||
                </tr>
 | 
					
 | 
				
			||||||
                <tr>
 | 
					            <div class="form-group row">
 | 
				
			||||||
                    <td colspan="2">
 | 
					                <input class="btn btn-primary btn-lg btn-block" name="team_edit" type="submit"
 | 
				
			||||||
                        <input type="submit" value="Modifier l'équipe"/>
 | 
					                       value="Modifier l'équipe"/>
 | 
				
			||||||
                    </td>
 | 
					            </div>
 | 
				
			||||||
                </tr>
 | 
					 | 
				
			||||||
                </tbody>
 | 
					 | 
				
			||||||
            </table>
 | 
					 | 
				
			||||||
        </form>
 | 
					        </form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	<?php } else { ?>
 | 
						<?php } else { ?>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY && date("Y-m-d H:i:s") <= $CONFIG->getInscriptionDate()) { ?>
 | 
							<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY && date("Y-m-d H:i:s") <= $CONFIG->getInscriptionDate()) { ?>
 | 
				
			||||||
            <!--suppress HtmlUnknownTarget -->
 | 
					            <!--suppress HtmlUnknownTarget -->
 | 
				
			||||||
            <a href="/mon-equipe/modifier">Modifier mon équipe</a>
 | 
					            <a href="/mon-equipe/modifier">
 | 
				
			||||||
 | 
					                <button class="btn btn-secondary btn-lg btn-block">Modifier mon équipe</button>
 | 
				
			||||||
 | 
					            </a>
 | 
				
			||||||
		<?php } ?>
 | 
							<?php } ?>
 | 
				
			||||||
        <hr/>
 | 
					        <hr/>
 | 
				
			||||||
        <h2>Autorisation de droit à l'image</h2>
 | 
					        <h2>Autorisation de droit à l'image</h2>
 | 
				
			||||||
@@ -91,49 +99,38 @@ for ($i = 1; $i <= 5; ++$i) {
 | 
				
			|||||||
		printDocuments($documents);
 | 
							printDocuments($documents);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
 | 
							if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
 | 
				
			||||||
            <hr/>
 | 
					            <form method="POST" enctype="multipart/form-data">
 | 
				
			||||||
            <form method="post" enctype="multipart/form-data">
 | 
					
 | 
				
			||||||
                <input type="hidden" name="type" value="photo_consent"/>
 | 
					                <div class="form-row">
 | 
				
			||||||
                <table >
 | 
					                    <div class="form-group col-md-12">
 | 
				
			||||||
                    <tbody>
 | 
					                        <label for="document">Fichier :</label>
 | 
				
			||||||
                    <tr>
 | 
					                        <input class="form-control" type="file" id="document" name="document" required/>
 | 
				
			||||||
                        <td>
 | 
					                    </div>
 | 
				
			||||||
                            <label for="file">Fichier :</label>
 | 
					                </div>
 | 
				
			||||||
                        </td>
 | 
					
 | 
				
			||||||
                        <td>
 | 
					                <div class="form-group row">
 | 
				
			||||||
                            <input type="file" id="file" name="document"/>
 | 
					                    <input class="btn btn-primary btn-lg btn-block" type="submit" name="send_document"
 | 
				
			||||||
                        </td>
 | 
					                           value="Envoyer le document"/>
 | 
				
			||||||
                    </tr>
 | 
					                </div>
 | 
				
			||||||
                    <tr>
 | 
					 | 
				
			||||||
                        <td colspan="2">
 | 
					 | 
				
			||||||
                            <input type="submit" name="send_document" value="Envoyer le document"/>
 | 
					 | 
				
			||||||
                        </td>
 | 
					 | 
				
			||||||
                    </tr>
 | 
					 | 
				
			||||||
                    </tbody>
 | 
					 | 
				
			||||||
                </table>
 | 
					 | 
				
			||||||
            </form>
 | 
					            </form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <hr/>
 | 
					            <hr/>
 | 
				
			||||||
            <table >
 | 
					
 | 
				
			||||||
                <tr>
 | 
					            <form method="POST">
 | 
				
			||||||
                    <td style="width: 50%;">
 | 
					                <input class="btn btn-primary btn-lg btn-block" type="submit" name="leave_team"
 | 
				
			||||||
                        <form method="post">
 | 
					                       value="Quitter l'équipe"/>
 | 
				
			||||||
                            <input type="submit" name="leave_team" value="Quitter l'équipe"/>
 | 
					 | 
				
			||||||
            </form>
 | 
					            </form>
 | 
				
			||||||
                    </td>
 | 
					
 | 
				
			||||||
			<?php
 | 
								<?php
 | 
				
			||||||
			$can_validate = canValidate($team);
 | 
								$can_validate = canValidate($team);
 | 
				
			||||||
			if ($can_validate) { ?>
 | 
								if ($can_validate) { ?>
 | 
				
			||||||
                        <td style="width: 50%;">
 | 
					 | 
				
			||||||
                <form method="post">
 | 
					                <form method="post">
 | 
				
			||||||
                                <input type="checkbox" name="engage" id="engage"/> <label for="engage">Je m'engage à
 | 
					                    <input class="form-control" type="checkbox" name="engage" id="engage"/> <label for="engage">Je m'engage à
 | 
				
			||||||
                        participer à l'intégralité des Correspondances</label><br/>
 | 
					                        participer à l'intégralité des Correspondances</label><br/>
 | 
				
			||||||
                                <input type="submit" name="request_validation"
 | 
					                    <input class="btn btn-primary btn-lg btn-block" type="submit" name="request_validation"
 | 
				
			||||||
                           value="Demander la validation"/>
 | 
					                           value="Demander la validation"/>
 | 
				
			||||||
                </form>
 | 
					                </form>
 | 
				
			||||||
                        </td>
 | 
					 | 
				
			||||||
			<?php } ?>
 | 
								<?php } ?>
 | 
				
			||||||
                </tr>
 | 
					 | 
				
			||||||
            </table>
 | 
					 | 
				
			||||||
		<?php } else if (Phase::getCurrentPhase() >= Phase::PHASE1) { ?>
 | 
							<?php } else if (Phase::getCurrentPhase() >= Phase::PHASE1) { ?>
 | 
				
			||||||
            <hr/>
 | 
					            <hr/>
 | 
				
			||||||
            <h2>Déroulement du tournoi</h2>
 | 
					            <h2>Déroulement du tournoi</h2>
 | 
				
			||||||
@@ -152,7 +149,7 @@ for ($i = 1; $i <= 5; ++$i) {
 | 
				
			|||||||
						$answer = Video::getVideo($asker->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $asker);
 | 
											$answer = Video::getVideo($asker->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $asker);
 | 
				
			||||||
						?>
 | 
											?>
 | 
				
			||||||
                        <h5>Questions de l'équipe <?= $asker->getName() ?> (<?= $asker->getTrigram() ?>) :</h5>
 | 
					                        <h5>Questions de l'équipe <?= $asker->getName() ?> (<?= $asker->getTrigram() ?>) :</h5>
 | 
				
			||||||
                        <table >
 | 
					                        <table>
 | 
				
			||||||
                            <tbody>
 | 
					                            <tbody>
 | 
				
			||||||
							<?php
 | 
												<?php
 | 
				
			||||||
							for ($j = 0; $j < 6; ++$j) {
 | 
												for ($j = 0; $j < 6; ++$j) {
 | 
				
			||||||
@@ -231,7 +228,7 @@ for ($i = 1; $i <= 5; ++$i) {
 | 
				
			|||||||
                        <br/>
 | 
					                        <br/>
 | 
				
			||||||
                        <h5>Vos questions :</h5>
 | 
					                        <h5>Vos questions :</h5>
 | 
				
			||||||
                        <br/>
 | 
					                        <br/>
 | 
				
			||||||
                        <table >
 | 
					                        <table>
 | 
				
			||||||
                            <tbody>
 | 
					                            <tbody>
 | 
				
			||||||
							<?php
 | 
												<?php
 | 
				
			||||||
							for ($j = 0; $j < 6; ++$j) {
 | 
												for ($j = 0; $j < 6; ++$j) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user