View Flight
<<Back to Main Menu
Description:
Shows the details of a flight, with different options, depending on user-type
Accessible by:
Managers
Accessed from:
Select Flight (for managers)
Cheapest Flights (for managers)
View Flights
Add Flight
Cancel Flight Form if the manager decides not to cancel the flight.
Input parameters:
flightNumber
Output
Flight data (to, from (with links to View Airport number of seats sold and available, revenue information, list of all bookings made on the flight and a link to Cancel Flight
Pseudo Code:
get/create session
if ('usertype' param in the session == 'm') {
get parameters from the form
if (there is a 'flightNumber' param) {
get flight and route data from the database
display flight information (route (with link to View Route), from (with link to View Airport), to (with link to View Airport), operator, date, time, first class price, economy price, children's price)
get booking information from the DB
display number of seats booked and available
display total revenue associated with the flight
display list of all bookings associated with the flight
display link to Cancel Flight (with areYouSure param set to 'no')
}
else {
display an error message
}
}
else {
error message to say user must be a manager
}