1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-30 00:13:02 +00:00
plateforme-tfjm2/server_files/tournois.php
2019-08-21 22:56:46 +02:00

50 lines
2.3 KiB
PHP

<?php
include 'config.php';
$response = $DB->query("SELECT `name`, `date_start`, `date_end`, `date_inscription`, `date_solutions`, `size` FROM `tournaments`
WHERE `year` = '$YEAR' ORDER BY `date_start`, `name`;");
?>
<?php include "header.php" ?>
<h2>Liste des tournois</h2>
<table style="border: 1px solid black; width: 100%">
<thead style="border: 1px solid black">
<tr>
<th style="border: 1px solid black; text-align: center">Lieu</th>
<th style="border: 1px solid black; text-align: center">Dates</th>
<th style="border: 1px solid black; text-align: center">Inscription avant le</th>
<th style="border: 1px solid black; text-align: center">Date de rendu des solutions</th>
<th style="border: 1px solid black; text-align: center">Places disponibles</th>
</tr>
</thead>
<tbody style="border: 1px solid black">
<?php
while (($data = $response->fetch()) !== FALSE) {
?>
<tr style="border: 1px solid black">
<td style="border: 1px solid black; text-align: center"><a href="<?= $URL_BASE ?>/tournoi/<?= $data["name"] ?>"><?= $data["name"] ?></a></td>
<td style="border: 1px solid black; text-align: center">Du <?php echo echo_date($data["date_start"]) ?> au <?php echo echo_date($data["date_end"]) ?></td>
<td style="border: 1px solid black; text-align: center"><?php echo echo_date($data["date_inscription"]) ?></td>
<td style="border: 1px solid black; text-align: center"><?php echo echo_date($data["date_solutions"]) ?></td>
<td style="border: 1px solid black; text-align: center"><?php echo $data["size"] ?></td>
</tr>
<?php
}
?>
</tbody>
<tfoot style="border: 1px solid black">
<tr>
<th style="border: 1px solid black; text-align: center">Lieu</th>
<th style="border: 1px solid black; text-align: center">Dates</th>
<th style="border: 1px solid black; text-align: center">Inscription avant le</th>
<th style="border: 1px solid black; text-align: center">Date de rendu des solutions</th>
<th style="border: 1px solid black; text-align: center">Places disponibles</th>
</tr>
</tfoot>
</table>
<?php include "footer.php" ?>