DISC 4372 FALL 2001 Parks Name_______________________________________________________

1. (50 points) An ISP provides to its users a contact list service. For each user, the ISP allows a user to keep an unlimited number of contacts. The structure for the table contacts is:

user_id char(8),
contact_first_name varchar (30),
contact_last_name varchar (30),
contact_middle_name varchar (30),
contact_address_line1 varchar (30),
contact_address_line2 varchar (30),
contact_city varchar (20),
contact_state char (2),
contact_employer varchar (30),
contact_home_phone char (10),
contact_work_phone char (10),
contact_cell_phone char (10),
contact_pager char (10),
contact_email varchar (50),
contact_birthyear int, '***valid years are 0 thru 9999
contact_birthmonth int, '*** valid months are 1 - 12
contact_birthday int, '***valid days are 1-31
contact_current_age int

Write an asp program (named modphone.asp) to allow users to modify their contact's phone numbers. The program should:

  1. On the first pass, the asp program gets the user's 8 character user_id.
  2. On the second pass, the program returns one table row for EVERY person on the user's contact list. The row should contain six columns:
    1. a clickable link that is labelled "Click here to modify this contact's phone numbers" in the first column.
    2. the contact's first, middle and last name in the second column.
    3. and the current values for their home, work, cell, and pager numbers in columns 3 thru 6.
    The data in this table is not in textboxes -- it is only printed in the table cells.
  3. On the third pass, the asp program returns:
    1. the chosen contact's: first middle and last name (i.e., the one they clicked on in the second pass).
    2. four text boxes containing the current values of home, work, cell and pager numbers.
    3. and a submit button.
  4. The contacts table is updated on the fourth pass by replacing the current table values for home, work, cell and pager numbers with the values the user modified or entered on the third pass (if the value was not modified it is still replaced in the table). Report to the user the status of the modifications (i.e., worked OK or not)

Do NOT edit the user's input data on ANY pass.

2. (50 points) The ISP wishes to provide a report for the users called "My Contact's Birthdays This Month" (name this program birthday-list.asp). On the first pass, the user is required to enter their 8 character user-id and to pick a month (1 thru 12) from a select box and then click a submit button. The asp program returns a table with one row for each person with a birthday in the month selected in pass one. The table contains four columns:

  1. the first column contains the contact's first, middle and last name.
  2. the second column contains the contacts complete birth date in mm/dd/yyyy format.
  3. the third column contains the contact's age.
  4. the fourth column contains a "mailto" link for the contact.
    the format is: <a href="mailto:contact_email">Click here to email contact_first_name</a>
The report should be sorted by birthday (i.e., birthdays at the beginning of the month appear before birthdays later in the month). Do not edit the user's input data.