MIS 4372 Parks Midterm Summer 2012

Last 4 digits PSID_____________ Name__________________________________________

1. (80 points) The WhatIsMyPasswordServices Inc. (WIMPS) provides a web based service so that customers can store their userids and passwords for all their websites in a secure web-accessible environment. The two main tables for WIMPS are named wimpsMain and wimpsDetail and they looks like this:
wimpsMain
bridgeId bigint IDENTITY (1,1),
wimpUserid varchar(50) NOT NULL
wimpPwd varchar(50) NOT NULL
lastname varachar (40) NOT NULL,
firstname varachar (40) NOT NULL,
...lotsa demographics fields....
PRIMARY KEY (bridge_id)
wimpsDetail
bridgeId2 bigint IDENTITY (1,1),
wimpUserid varchar(50) NOT NULL
webAddress varchar(100) NOT NULL,
webUserid varchar(50) NOT NULL,
webPwd varchar(50) NOT NULL,
lastUpdatedDate varchar (24),
   [use the vbscript value of the function named now]
previousUserid varchar(50) NOT NULL,
previousPwd varchar(50) NOT NULL,
PRIMARY KEY (bridgeId2)

Write an update programs named wimpUpdate.asp that has four passes:

 • Pass 1 -- Provide a HTML login page with in a form with METHOD="POST" and ACTION="wimpUpdate.asp" that has:
     • 50 character textbox the following text preceeding the textbox: "Enter your WIMP Userid"
     • 50 character password textbox the following text preceeding the textbox: "Enter your WIMP Password"
     • a hidden variable named token with a value set to "2"
     • a submit button

 • Pass 2
     • Using the userid and password provided from Pass 1, check to see that the user exists in the wimpsMain table.
     • If the lookup fails, write an appropriate error message and direct the user to hit the "BACK" button
     • If the lookup works OK, provide a link for EACH row in the wimpsDetail where the valid wimpUserid received exists.
     • Each link should appear on a single line and look like this:

<a href='wimpUpdate.asp?token=3&uid=[bridgeId2 value from wimpsDetail]'>[webAddress value from wimpsDetail]</a>

     • NOTE: DO NOT PLACE the "[" NOR the "]" in this anchor tag.

 • Pass 3 -- Retrieve the row from wimpsDetail using the bridgeId2 provided in the previous pass
     • Provide an HTML page with three textboxes of the apprpriate size for: (1) webAddress; (2) webUserid; and (3) webPwd.
     • Place the current values of the three fields above into the three textboxes using a value clause.
     • Also include:
     • a hidden variable named bi2 with a value set to "bridgeId2"
     • a hidden variable named token with a value set to "4"
     • a hidden variable named olduid with a value set to CURRENT value of webUserid
     • a hidden variable named oldpwd with a value set to CURRENT value of webPwd

 • Pass 4 -- Using the value of "bridgeId2" received, update:
     • the values webAddress; webUserid; and (3) webPwd in wimpsDetail using the values received
     • the values of previousUserid and previousPwd with the values of olduid and oldpwd received.
     • the value of lastUpdatedDate using the value of the vbscript function named now. Perform NO data edits in ANY pass.

2. (20 points) Write report for the wimpUserid="gl001" that places each row in the wimpsDetail into an HTML table. Sort the rows into ascending webAddress order. There will be 8 columns. Provide NO headings. Show the row count after the table.