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 ""; echo ""; echo ""; @@ -99,14 +100,14 @@ $requete = "SELECT personne FROM reservation WHERE moment='$new_date' AND reserve=$banc AND HEUREDEBUT='$heure'"; $exec_requete = mysqli_query($db,$requete); $reponse = mysqli_fetch_all($exec_requete); - echo ""; + $personne = $reponse[0][0]; + echo ""; if($reponse[0][0]==""){ - /* TODO : Bonnes redirections vers les bons fichiers */ - echo ""; } diff --git a/html/mesReservations.php b/html/mesReservations.php index 82b68ad..7125036 100644 --- a/html/mesReservations.php +++ b/html/mesReservations.php @@ -42,7 +42,7 @@ foreach($reponse as $creneau){ echo "
"; echo "Banc : $creneau[0] | Date : $creneau[1] $creneau[3]-$creneau[4]"; - echo "
"; + echo ""; echo ""; echo ""; /* Utilisation pour accès aux reservations */ diff --git a/html/supprReservation.php b/html/supprReservation.php index 6430b1f..8751fb8 100644 --- a/html/supprReservation.php +++ b/html/supprReservation.php @@ -1,18 +1,25 @@ "; + if($identifiant=="admin"){ + echo ""; + }else{ + echo ""; + } mysqli_close($db); } ?> -- libgit2 0.21.2
".$reponse[0][0]."$personne
"; + echo "
"; }else if($reponse[0][0]=="admin"){ - echo "
"; + echo "
"; }else{ - echo "
"; + echo "
"; } echo "