2019-09-07 11:42:36 +00:00
|
|
|
<?php
|
|
|
|
require_once "header.php";
|
|
|
|
|
2019-09-07 16:08:40 +00:00
|
|
|
if (isset($tournament)) {
|
|
|
|
if ($has_error) {
|
2019-09-06 11:48:50 +00:00
|
|
|
echo "<h2>Erreur : " . $error_message . "</h2>";
|
2019-09-07 16:08:40 +00:00
|
|
|
}
|
|
|
|
else {
|
2019-09-06 11:48:50 +00:00
|
|
|
echo "<h2>Tournoi de " . htmlspecialchars($_POST["name"]) . " ajouté avec succès !</h2>";
|
|
|
|
}
|
|
|
|
}?>
|
|
|
|
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="submitted" value="true" />
|
|
|
|
<table style="width: 100%;">
|
|
|
|
<tbody>
|
|
|
|
<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" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
2019-09-07 16:08:40 +00:00
|
|
|
<label for="organizers">Organisateurs :</label>
|
2019-09-06 11:48:50 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2019-09-07 16:08:40 +00:00
|
|
|
<select style="width: 100%;" id="organizers" name="organizers[]" multiple size="4" required>
|
2019-09-06 11:48:50 +00:00
|
|
|
<?php
|
|
|
|
while (($data = $orgas_response->fetch()) !== FALSE) {
|
|
|
|
echo "<option value=\"" . $data["id"] . "\">" . $data["first_name"] . " " . $data["surname"] . "</option>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="size">Nombre d'équipes :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 100%;" type="number" id="size" name="size" min="3" max="12" value="6" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="place">Lieu :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 100%;" type="text" id="place" name="place" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="price">Prix par participant</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 100%;" type="number" id="price" name="price" min="0" max="21" value="21" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="date_start">Dates :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
Du <input style="width: 45%;" type="date" id="date_start" name="date_start" required /> au <!--suppress HtmlFormInputWithoutLabel -->
|
|
|
|
<input style="width: 45%;" type="date" id="date_end" name="date_end" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="date_inscription">Date limite d'inscription :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 49%;" type="date" id="date_inscription" name="date_inscription" required />
|
|
|
|
<!--suppress HtmlFormInputWithoutLabel -->
|
|
|
|
<input style="width: 49%;" type="time" id="time_inscription" name="time_inscription" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="date_solutions">Date limite pour rendre les solutions :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 49%;" type="date" id="date_solutions" name="date_solutions" required />
|
|
|
|
<!--suppress HtmlFormInputWithoutLabel -->
|
|
|
|
<input style="width: 49%;" type="time" id="time_solutions" name="time_solutions" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="date_syntheses">Date limite pour rendre les notes de synthèse :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 49%;" type="date" id="date_syntheses" name="date_syntheses" required />
|
|
|
|
<!--suppress HtmlFormInputWithoutLabel -->
|
|
|
|
<input style="width: 49%;" type="time" id="time_syntheses" name="time_syntheses" required />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="description">Description :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<textarea style="width: 100%;" name="description" id="description" required></textarea>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<label for="final">Ce tournoi est la finale nationale :</label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input style="width: 100%;" type="checkbox" id="final" name="final" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<input style="width: 100%;" type="submit" value="Ajouter un tournoi" />
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2019-09-07 11:42:36 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<?php require_once "footer.php" ?>
|