Route Search

<<Back to Main Menu

Description:
Processes a Route Search Form to display the parts of routes between two cities

Accessible by:
Managers

Accessed from:
Route Search Form

Input parameters:
Departure Airport
Arrival Airport

Output
Success message with link to View Route
Route Search Form and error message if there were errors in the form


Pseudo Code:
get/create session
if ('usertype' param in session == 'm') {
   validate form
   if (form params are in the correct format) {
      display an Route Search Form
      if (there's a Route from 'Departure Airport' to 'Arrival Airport' in the database) {
         display the Route details with link to View Route
      }
      if (there's a Complex Route from 'Departure Airport' to 'Arrival Airport' in the database) {
         display the Route Parts' details with link to View Route
      }
      if (there are no matches) {
         display error message
      }
   }
   else {
      display an Route Search Form with an error message
   }
}
else {
   error message to say user must be a manager
}