diff --git a/html/ajoutReservation.php b/html/ajoutReservation.php index 180d4d4..5831eb8 100644 --- a/html/ajoutReservation.php +++ b/html/ajoutReservation.php @@ -49,6 +49,13 @@ $requete = "INSERT INTO reservation VALUES($banc,'$date','$login','$heure','$heurefin')"; $exec_requete = mysqli_query($db,$requete); echo ""; + }elseif(isset($_GET['txtDate']) && isset($_GET['banc']) && isset($_GET['heure'])){ + $date = $_GET['txtDate']; + $banc = $_GET['banc']; + $heure = $_GET['heure']; + $requete = "INSERT INTO reservation VALUES($banc,'$date','$login','$heure','$heurefin')"; + $exec_requete = mysqli_query($db,$requete); + echo ""; }else{ //echo "L'ajout n'a pas fonctionné"; echo ""; diff --git a/html/gestionReservation.php b/html/gestionReservation.php index 99575d2..8479c89 100644 --- a/html/gestionReservation.php +++ b/html/gestionReservation.php @@ -71,6 +71,7 @@ $exec_requete = mysqli_query($db,$requete); $reponse = mysqli_fetch_all($exec_requete); /* Affichage des reservations */ + /* TODO : Si date déjà passée = Seulement consultation */ echo "
".$reponse[0][0]." | "; + $personne = $reponse[0][0]; + echo "$personne | "; if($reponse[0][0]==""){ - /* TODO : Bonnes redirections vers les bons fichiers */ - echo ""; + echo " | "; }else if($reponse[0][0]=="admin"){ - echo " | "; + echo " | "; }else{ - echo " | "; + echo " | "; } echo " |