Update partie_controleur.php, config-bd.php, script_migration_data.sql, menu.php, and parties_vue.php files

This commit is contained in:
Morph01
2024-04-08 22:44:54 +02:00
parent 2a9a2f3256
commit 05b71d7108
5 changed files with 100 additions and 39 deletions

58
vues/parties_vue.php Normal file
View File

@@ -0,0 +1,58 @@
<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>
<div>
<table class="table_resultat">
<tbody>
<?php
if (isset($_POST['boutonAfficher'])) {
// foreach ($partie['instances'][(int) $_POST["selectparty"]] as $row) { // pour parcourir les n-uplets
// echo '<tr>';
// echo $row;
// echo "-";
// echo '</tr>';
// }
$donnees = ['idpartie', 'date_partie', 'horaire'];
$parties = $partie['instances'][(int) $_POST["selectparty"] - 1];
echo '<a href="https://bdw.univ-lyon1.fr/p2203977/DeezCycle/index.php?';
foreach ($donnees as $donnee) {
echo $donnee . '=' . $parties[$donnee] . '&';
}
echo 'taille=12">Voir les détails de la partie</a>';
/*
echo "Partie n°" . $parties["idpartie"] . "<br/>";
echo $parties["idpartie"]."_".$parties["date_partie"]."_".$parties[";*/
} else {
echo "<h1>Selectionnez une partie !</h1>";
}
?>
</tbody>
</table>
</div>
</div>