From: Jérôme Benoit Date: Wed, 17 Jan 2018 15:41:44 +0000 (+0100) Subject: Fixlets to today coding session. X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0a87f4538a04b4dba4888a6abdb166ba8f465ba4;p=Project_webapp.git Fixlets to today coding session. Signed-off-by: Jérôme Benoit --- diff --git a/includes/booking.php b/includes/booking.php new file mode 100644 index 0000000..e69de29 diff --git a/includes/formbooking.php b/includes/formbooking.php index 3d55c50..2d47f81 100644 --- a/includes/formbooking.php +++ b/includes/formbooking.php @@ -35,6 +35,8 @@ if (!$input_failure && $is_logged_in && !empty($form_nb_place) && !empty($form_c if (!empty($nb_booked)) { echo "Vous avez déjà réservé ce vol, vous allez être redirigé vers la liste de vos réservations dans 2 secondes.
"; redirect("index.php?page=reservations", 2); + include('footer.html'); + exit(); } $sql_pquery = "insert into RESERVATIONS (NumCl, NumVol, Classe, NbPlaces) values (?, ?, ?, ?)"; diff --git a/includes/formsearch.php b/includes/formsearch.php index 7796f06..e40ab12 100644 --- a/includes/formsearch.php +++ b/includes/formsearch.php @@ -90,7 +90,7 @@ if (empty($form_arrival_date)) { /> - +
diff --git a/includes/reservations.php b/includes/reservations.php index f560b9a..15beeac 100644 --- a/includes/reservations.php +++ b/includes/reservations.php @@ -10,8 +10,9 @@ if (!$is_logged_in) {

Mes réservations

Actions\n"; echo " \n"; foreach ($rows as $row) { + $oDepartureDate = new DateTime($row['DateD']); echo " \n"; echo " " . $row['NumVol'] . "\n"; echo " " . $row['VilleD'] . "\n"; @@ -50,15 +52,19 @@ if (empty($rows)) { echo " " . $row['Classe'] . "\n"; echo " " . $row['NbPlaces'] . "\n"; echo " " . $row['Prix'] . "€\n"; - echo " -
- - - - - -
- \n"; + if ($oDepartureDate > $oDateNow) { + echo " +
+ + + + + +
+ \n"; + } else { + echo "Vol en cours"; + } echo " \n"; } echo ""; diff --git a/includes/search.php b/includes/search.php index 3365090..c7e761f 100644 --- a/includes/search.php +++ b/includes/search.php @@ -43,6 +43,6 @@ - +