Assignment #9

Part 1

This assignment will have a web site that has five pages. The main page will be

http://homepages.findlay.edu/YourUserName/565/assignment09/default.asp

You created a menu in assignment #7. That file should have a URL like this:

http://homepages.findlay.edu/YourUserName/565/assignment07/textmenu.asp

Use a "server side include" to place the menu you created in assignment #7 on each assignment page for your entire site. You will need to update the textmenu.asp so that there are links to assignments #8, #9 and #10.

Because a server side include will only work with ASP, SHTML and DHTML file extensions, all DEFAULT.HTM file will need to be renamed DEFAULT.ASP before the include file can be added. When you are finished, your textmenu.asp include file will be on your "main" page as well assignments 5, 6, 7, 8, 9 and 10.

Part 2

Modify your Assignment07/School site so that each page uses the same cascading style sheet. Name your style sheet school.css and place it in the Assignment07/School folder. Modify each page of the "school" site by adding

<link rel="stylesheet" type="text/css"
href="school.css">

to the heading of the HTML.

In your style sheet define two different styles of texts. Define the font, size and color for each style. Use each style at least once on each of your "school" pages. One option is to define one "heading" style and one "paragraph" style. Use each style as least one time on each of the five "school" pages. See this example.

Assignment #9 (Bonus)

On the assignment #9 main page create links to each of these pages

RotatingGraphic.asp

DynamicText.asp

ReDirect.asp

AUP.asp

(10 pts) RotatingGraphic.asp will use five of your pictures from your index project in assignment #5. Write a script that randomly selects one of your pictures, and displays the picture on the page. Reloading the page should randomly cycle through the five pictures.

(10 pts) DynamicText.asp will display dynamic text. On this page display a counter that tells the number of days left until Christmas. This will involve a calculation. Create a variable called CurrectDate and another called ChristmasDay. Make one of these equal to today's date and the other equal to the date on Christmas day. Subtract one variable from the other, and use a Response.Write to display that difference.

(10 pts) ReDirect.asp is going to use a session variable and an IF THEN ELSE statement. Here is the scenario. Your school superintendent is afraid visitors to certain parts of the school web site could cause legal problems for the district. To combat this, you must force all visitors that wish to view certain parts of the web site (redirect.asp in this case) to first "agree" with the district's acceptable use policy (AUP) before they can view certain pages.

Display your AUP on the AUP.asp page. On this page, give the visitor a chance to "agree" to your AUP. If the user selects "agree" set a session variable to "AGREE", indicating that the visitor has looked at the AUP, and agreed to it. The ReDirect.asp page should test to see if the user has accepted the AUP. If a visitor has not agreed to the AUP, re-direct them to the AUP page automatically. A ReDirect.asp page that works correctly will only be viewable if the AUP is first accepted.

Home - Server Side Include - Dynamic Text - Rotating Graphics - Re-Direct - CSS