View Airport

<<Back to Main Menu

Description:
Shows the details of an airport.

Accessible by:
Managers and Customers

Accessed from:
View Airports
View Route
Add Airport
View Flight
Edit Airport

Input parameters:
Airport Code

Output
Airport details and statistics - code, name, city, country, total revenue, number of routes, average revenue, list of routes serving the airport.

Pseudo Code:
get/create session
if ('username' param exists in the session) {
   if (there is an 'Airport code' param in the form {
      get Airport Code parameter from the form
      get flight and route data from the database
      display data all users can see (code, name, city (with link to View City), country, number of routes, list of routes serving (with links to View Route))
      if ('usertype' param from session == 'm') {
         display manager-specific information (total revenue, daily revenue)
         display link to Edit Airport Form
      }
   }
   else {
      display error message
   }
}
else {
   error message to say user must be logged in
}