Add password change feature.
[Project_webapp.git] / includes / reservations.php
index 15beeacb5777c9442114277e9bd3a21b885ce332..43148671acd1a16ce90e0ccf6032a8b4cc734599 100644 (file)
@@ -2,6 +2,7 @@
 global $is_logged_in;
 if (!$is_logged_in) {
     echo "Please login first. <br>";
+    $_SESSION['login_referer'] = $_SERVER['HTTP_REFERER'];
     redirect("index.php?page=login", 2);
     include('footer.html');
     exit();
@@ -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) re&#769;servation(s) en cours pour le moment. <br>";
 } else {
@@ -59,14 +59,14 @@ if (empty($rows)) {
                           <input type=\"hidden\" name=\"flight_id\" value=\"" . $row['NumVol'] . "\" />
                           <input type=\"hidden\" name=\"class_name\" value=\"" . $row['Classe'] . "\" />
                           <input type=\"submit\" name=\"modify\" value=\"Modifier\">
-                          <input type=\"submit\" name=\"cancel\" value=\"Annuler\">
+                          <input type=\"button\" name=\"cancel\" value=\"Annuler\" onClick=\"ConfirmCancelFlight()\">
                         </form>
                       </td>\n";
         } else {
-            echo "Vol en cours";
+            echo "Vol en cours\n";
         }
         echo "  </tr>\n";
     }
-    echo "</table>";
+    echo "</table>\n";
 }
 ?>