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);
$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. <br>";
} else {
<input type=\"hidden\" name=\"form\" value=\"reservations\" />
<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=\"modify\" value=\"Modifier\" onClick=\"location.href='index.php?page=modify&flight_id=" . $row['NumVol'] . "&class_name=" . $row['Classe'] . "';\">
+ <input type=\"button\" name=\"cancel\" value=\"Annuler\" onClick=\"ConfirmCancelFlight()\">
</form>
</td>\n";
} else {