View Profile

<<Back to Main Menu

Description:
Displays a user profile.

Accessible by:
Customers and managers

Accessed from:
Main Menu (for all users)
Customer Search (for managers only)

Input parameters:
Username

Output
Profile details - name, address, telephone, email, credit/debit card details (not number), bookings made (with aggregate expenditure), searches performed.
Searches performed only appears in the managers' screen.

Pseudo Code:
get/create session
get parameters from the form
validate form
if ('username' param in the session exists) {
   if (('usertype' param in the session == 'm') AND ('username' param exists in the form)) {
      get user, address, card, search and booking data from database
      display profile information with link to Edit Profile Form
   }
   else {
      get user, address and card data from the database
      display logged in user's own profile with link to Edit Profile Form
   }
}
else {
   error message to say user must be logged in
}