50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
<div class="panneau_details"> <!-- Second bloc permettant l'affichage du détail d'une table -->
|
|
|
|
<h2>Affichage des parties</h2>
|
|
|
|
|
|
<form class="bloc_commandes" method="post" action="#">
|
|
|
|
<label for="typeVueTable">Voir Parties</label>
|
|
<?php
|
|
$selection = 1;
|
|
if (isset($_POST['selectparty'])) {
|
|
$selection = (int) $_POST["selectparty"];
|
|
}
|
|
echo '<select id="selectpartie" name="selectparty">';
|
|
for ($i = 1; $i <= 50; $i++) {
|
|
echo '<option value="' . $i . '"';
|
|
if ($i == $selection) {
|
|
echo ' selected';
|
|
}
|
|
echo '>Partie n°' . $i . '</option>';
|
|
}
|
|
?>
|
|
<input type="submit" name="boutonAfficher" value="Afficher" />
|
|
|
|
|
|
</form>
|
|
|
|
|
|
<tbody>
|
|
<?php
|
|
if (isset($_POST['boutonAfficher'])) {
|
|
$donnees = ['idpartie', 'date_partie', 'horaire'];
|
|
$parties = $partie['instances'][(int) $_POST["selectparty"] - 1];
|
|
|
|
$url = 'https://bdw.univ-lyon1.fr/p2203977/DeezCycle/vues/details_vue.php?';
|
|
foreach ($donnees as $donnee) {
|
|
$url .= $donnee . '=' . $parties[$donnee] . '&';
|
|
}
|
|
$url .= 'taille=12';
|
|
|
|
echo '<a href="' . $url . '">' . "Afficher les détails de la partie" . '</a>';
|
|
exit;
|
|
} else {
|
|
echo "<h1>Selectionnez une partie !</h1>";
|
|
}
|
|
?>
|
|
</tbody>
|
|
|
|
|
|
</div>
|