X-Git-Url: https://git.piment-noir.org/?p=Project_webapp.git;a=blobdiff_plain;f=includes%2Freservations.php;h=0d32077720b46e5c5271580c0ad8461c44a3833b;hp=15beeacb5777c9442114277e9bd3a21b885ce332;hb=68cee0ac3fe728566e16dc0460416c77022f4b22;hpb=0a87f4538a04b4dba4888a6abdb166ba8f465ba4
diff --git a/includes/reservations.php b/includes/reservations.php
index 15beeac..0d32077 100644
--- a/includes/reservations.php
+++ b/includes/reservations.php
@@ -2,6 +2,7 @@
global $is_logged_in;
if (!$is_logged_in) {
echo "Please login first.
";
+ $_SESSION['login_referer'] = $_SERVER['HTTP_REFERER'];
redirect("index.php?page=login", 2);
include('footer.html');
exit();
@@ -16,7 +17,7 @@ $oDateNow = new Datetime($date_now);
global $connection;
$sql_pquery = "select RESERVATIONS.NumVol as NumVol, VilleD, DateD, VilleA, DateA, RESERVATIONS.Classe, NbPlaces, round(CoutVol*CoeffPrix*NbPlaces, 2) as Prix
from RESERVATIONS join VOLS on RESERVATIONS.NumVol = VOLS.NumVol
- join DEFCLASSES on DEFCLASSES.NumVol = VOLS.NumVol and RESERVATIONS.Classe = DEFCLASSES.Classe
+ join DEFCLASSES on DEFCLASSES.NumVol = RESERVATIONS.NumVol and DEFCLASSES.NumVol = VOLS.NumVol and DEFCLASSES.Classe = RESERVATIONS.Classe
where NumCl = ? and DateD > ?
order by DateD, NumVol, Prix";
$connection->prepare_query($sql_pquery);
@@ -25,7 +26,6 @@ $connection->run_prepared_query();
$connection->get_pquery_result();
$rows = $connection->get_result_array();
$connection->close_prepared_query();
-//var_dump($rows);
if (empty($rows)) {
echo "Aucune(s) réservation(s) en cours pour le moment.
";
} else {
@@ -58,15 +58,15 @@ if (empty($rows)) {
-
-
+
+
\n";
} else {
- echo "Vol en cours";
+ echo "Vol en cours\n";
}
echo " \n";
}
- echo "";
+ echo "\n";
}
?>