mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 13:52:17 +01:00 
			
		
		
		
	Modifications mineures
This commit is contained in:
		@@ -18,7 +18,7 @@ if (isset($tournament) && !$has_error)  { ?>
 | 
			
		||||
    <div class="form-row">
 | 
			
		||||
        <div class="form-group col-md-6">
 | 
			
		||||
            <label for="name">Nom du tournoi :</label>
 | 
			
		||||
            <input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ ]+"
 | 
			
		||||
            <input class="form-control" type="text" id="name" name="name" pattern="[A-Za-zÀ-ÿ\- ]+"
 | 
			
		||||
                   value="<?php if (isset($tournament)) echo $tournament->name ?>" required/>
 | 
			
		||||
        </div>
 | 
			
		||||
 | 
			
		||||
@@ -34,8 +34,8 @@ if (isset($tournament) && !$has_error)  { ?>
 | 
			
		||||
            <label for="organizers">Organisateurs :</label>
 | 
			
		||||
            <select style="width: 100%;" id="organizers" name="organizers[]" multiple size="4" class="custom-select" required>
 | 
			
		||||
                <?php
 | 
			
		||||
                while (($data = $orgas_response->fetch()) !== FALSE) {
 | 
			
		||||
                    echo "<option value=\"" . $data["id"] . "\">" . $data["first_name"] . " " . $data["surname"] . "</option>\n";
 | 
			
		||||
                foreach (User::getOrganizers() as $organizer) {
 | 
			
		||||
                    echo "<option value=\"" . $organizer->getId().  "\">" . $organizer->getFirstName() . " " . $organizer->getSurname() . "</option>\n";
 | 
			
		||||
                }
 | 
			
		||||
                ?>
 | 
			
		||||
            </select>
 | 
			
		||||
@@ -60,12 +60,12 @@ if (isset($tournament) && !$has_error)  { ?>
 | 
			
		||||
        <div class="form-group col-md-6">
 | 
			
		||||
            <label for="date_start">Début du tournoi :</label>
 | 
			
		||||
            <input class="form-control" type="date" id="date_start" name="date_start"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getStartDate(), 0, 10) : date('Y-m-d') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->date_start : date('Y-m-d') ?>"/>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="form-group col-md-6">
 | 
			
		||||
            <label for="date_end">Fin du tournoi :</label>
 | 
			
		||||
            <input class="form-control" type="date" id="date_end" name="date_end"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getEndDate(), 0, 10) : date('Y-m-d') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->date_end : date('Y-m-d') ?>"/>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
@@ -73,30 +73,30 @@ if (isset($tournament) && !$has_error)  { ?>
 | 
			
		||||
        <div class="form-group col-md-4">
 | 
			
		||||
            <label for="date_inscription">Date limite d'inscription :</label>
 | 
			
		||||
            <input class="form-control" type="date" id="date_inscription" name="date_inscription"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getInscriptionDate(), 0, 10) : date('Y-m-d') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->date_inscription : date('Y-m-d') ?>"/>
 | 
			
		||||
            <input class="form-control" type="time" id="time_inscription" name="time_inscription"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getInscriptionDate(), 11, 5) : date('H:i') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->time_inscription : date('H:i') ?>"/>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="form-group col-md-4">
 | 
			
		||||
            <label for="date_solutions">Date limite de remise des solutions :</label>
 | 
			
		||||
            <input class="form-control" type="date" id="date_solutions" name="date_solutions"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getSolutionsDate(), 0, 10) : date('Y-m-d') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->date_solutions : date('Y-m-d') ?>"/>
 | 
			
		||||
            <input class="form-control" type="time" id="time_solutions" name="time_solutions"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getSolutionsDate(), 11, 5) : date('H:i') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->time_solutions: date('H:i') ?>"/>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="form-group col-md-4">
 | 
			
		||||
            <label for="date_syntheses">Date limite de remise des notes de synthèse :</label>
 | 
			
		||||
            <input class="form-control" type="date" id="date_syntheses" name="date_syntheses"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getSynthesesDate(), 0, 10) : date('Y-m-d') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->date_syntheses : date('Y-m-d') ?>"/>
 | 
			
		||||
            <input class="form-control" type="time" id="time_syntheses" name="time_syntheses"
 | 
			
		||||
                   value="<?= isset($tournament) ? substr($tournament->getSynthesesDate(), 11, 5) : date('H:i') ?>"/>
 | 
			
		||||
                   value="<?= isset($tournament) ? $tournament->time_syntheses : date('H:i') ?>"/>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="form-group row">
 | 
			
		||||
        <div class="form-group col-md-12">
 | 
			
		||||
            <label for="description">Description :</label>
 | 
			
		||||
            <textarea class="form-control" id="description" name="description"><?= isset($tournament) ? $tournament->getDescription() : "" ?></textarea>
 | 
			
		||||
            <textarea class="form-control" id="description" name="description"><?= isset($tournament) ? $tournament->description : "" ?></textarea>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -30,8 +30,10 @@
 | 
			
		||||
                    <a class="nav-link" href="/tournois">Liste des tournois</a>
 | 
			
		||||
                    <?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
 | 
			
		||||
                        <ul class="deroule">
 | 
			
		||||
                            <li class="nav-item active"><a class="nav-link" href="/profils-orphelins">Profils orphelins</a></li>
 | 
			
		||||
                            <li class="nav-item active"><a class="nav-link" href="/profils">Tous les profils</a></li>
 | 
			
		||||
                            <?php if ($_SESSION["role"] == Role::ADMIN) { ?>
 | 
			
		||||
                                <li class="nav-item active"><a class="nav-link" href="/profils-orphelins">Profils orphelins</a></li>
 | 
			
		||||
                                <li class="nav-item active"><a class="nav-link" href="/profils">Tous les profils</a></li>
 | 
			
		||||
                            <?php } ?>
 | 
			
		||||
                            <li class="nav-item active"><a class="nav-link" href="/organisateurs">Organisateurs</a></li>
 | 
			
		||||
                        </ul>
 | 
			
		||||
                    <?php } ?>
 | 
			
		||||
 
 | 
			
		||||
@@ -66,17 +66,21 @@ if (!$has_error) {
 | 
			
		||||
    </div>
 | 
			
		||||
<?php } ?>
 | 
			
		||||
 | 
			
		||||
<div class="alert alert-info">
 | 
			
		||||
    <strong>Date de naissance :</strong> <?= formatDate($user->getBirthDate()) ?><br />
 | 
			
		||||
</div>
 | 
			
		||||
<?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>
 | 
			
		||||
 | 
			
		||||
<div class="alert alert-info">
 | 
			
		||||
    <strong>Sexe :</strong> <?= $user->getGender() == "M" ? "Masculin" : "Féminin" ?><br />
 | 
			
		||||
</div>
 | 
			
		||||
    <div class="alert alert-info">
 | 
			
		||||
        <strong>Sexe :</strong> <?= $user->getGender() == "M" ? "Masculin" : "Féminin" ?><br />
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
<div class="alert alert-info">
 | 
			
		||||
    <strong>Adresse :</strong> <?= $user->getAddress() . ", " . $user->getPostalCode() . " " . $user->getCity() . ($user->getCountry() == "France" ? "" : ", " . $user->getCountry()) ?><br />
 | 
			
		||||
</div>
 | 
			
		||||
    <div class="alert alert-info">
 | 
			
		||||
        <strong>Adresse :</strong> <?= $user->getAddress() . ", " . $user->getPostalCode() . " " . $user->getCity() . ($user->getCountry() == "France" ? "" : ", " . $user->getCountry()) ?><br />
 | 
			
		||||
    </div>
 | 
			
		||||
<?php } ?>
 | 
			
		||||
 | 
			
		||||
<div class="alert alert-info">
 | 
			
		||||
    <strong>Adresse e-mail :</strong> <a href="mailto:<?= $user->getEmail() ?>"><?= $user->getEmail() ?></a><br />
 | 
			
		||||
@@ -156,7 +160,7 @@ if (!$has_error) {
 | 
			
		||||
<?php }
 | 
			
		||||
 | 
			
		||||
if ($user->getRole() == Role::ADMIN || $user->getRole() == Role::ORGANIZER) {
 | 
			
		||||
	foreach ($tournaments as $tournament) {
 | 
			
		||||
	foreach ($user->getOrganizedTournaments() as $tournament) {
 | 
			
		||||
		echo "<div class=\"alert alert-info\">Organise le tournoi <a href=\"/tournoi/" . $tournament->getName(). "\">" . $tournament->getName() . "</a></div>";
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -135,9 +135,9 @@ else {
 | 
			
		||||
                <label for="organizers">Organisateur·s :</label>
 | 
			
		||||
                <select class="custom-select" id="organizers" name="organizers[]" multiple size="4" required>
 | 
			
		||||
                    <?php
 | 
			
		||||
                    while (($orga_data = $orgas_response->fetch()) !== FALSE) {
 | 
			
		||||
                        echo "<option value=\"" . $orga_data["id"] . "\" " . ($tournament->organize($orga_data["id"]) ? "selected" : "")
 | 
			
		||||
                            . ">" . $orga_data["first_name"] . " " . $orga_data["surname"] . "</option>\n";
 | 
			
		||||
                    foreach (User::getOrganizers() as $orga) {
 | 
			
		||||
                        echo "<option value=\"" . $orga->getId() . "\" " . ($tournament->organize($orga->getId()) ? "selected" : "")
 | 
			
		||||
                            . ">" . $orga->getFirstName() . " " . $orga->getSurname() . "</option>\n";
 | 
			
		||||
                    }
 | 
			
		||||
                    ?>
 | 
			
		||||
                </select>
 | 
			
		||||
 
 | 
			
		||||
@@ -23,8 +23,8 @@
 | 
			
		||||
                <a href="/tournoi/<?= $tournament->getName() ?>"><?= $tournament->getName() ?></a>
 | 
			
		||||
            </th>
 | 
			
		||||
            <td>Du <?= formatDate($tournament->getStartDate()) ?> au <?= formatDate($tournament->getEndDate()) ?></td>
 | 
			
		||||
            <td><?= formatDate($tournament->getInscriptionDate()) ?></td>
 | 
			
		||||
            <td><?= formatDate($tournament->getSolutionsDate()) ?></td>
 | 
			
		||||
            <td><?= formatDate($tournament->getSynthesesDate()) ?></td>
 | 
			
		||||
            <td><?= $tournament->getSize() ?></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <?php
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user