home *** CD-ROM | disk | FTP | other *** search
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
- <HTML>
- <HEAD>
- <!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
- <META NAME="DESCRIPTION" CONTENT="Exploration Air's code explained in helpful terms">
- <META NAME="KEYWORDS" CONTENT="help, homepage, documentation,code, about, specification">
- <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
- <!-- END META TAG INFORMATION -->
-
- <TITLE>How The Exploration Air Homepage Works</TITLE>
- </HEAD>
-
- <BODY BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
- <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
-
- <!--Change link color on mouseover
- Only if running Internet Explorer 4.0 or later -->
- <!--#include file=../libHighlight.inc-->
-
- <!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND INTRODUCTORY CONTENT-->
- <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0 BGCOLOR="#000000" BORDER=0>
- <TR>
- <TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
- <BR>
- <IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171 ALT="Behind the Scenes at Exploration Air" BORDER=0 ></A>
- <BR>
- <BR>
- <BR>
- <!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
- <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">
- <IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Previous Page" HSPACE=2 BORDER=0></A>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2><STRONG>
- <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">
- B A C K</A></STRONG>
- </FONT>
- <BR>
- <BR>
- <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
- <A HREF="JavaScript:openWindow('../default.asp')">V I E W S O U R C E</A></FONT>
- </TD>
-
- <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=TOP>
- <BR CLEAR=ALL>
- <!--BEGIN NESTED TABLE HOLDING EXPLANATORY CONTENT-->
- <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>
- <TR>
- <TD VALIGN=TOP>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Exploration Air Homepage Works</FONT>
- <HR>
- <H2>Functional Overview</H2>
- The homepage is the main entry point to the Exploration Air web site. On the surface it looks quite simple,
- however it makes use of many technologies such as Active Server Pages (ASP), components,
- Java and file access.
- <P>
- When the user accesses the homepage, a number of things happen:
- <DIR>
- <LI>A <A HREF=#Applet>Java applet</A> is populated from a text file with the latest headlines and URLs of the full text.
- <LI>The browser type is ascertained; this determines whether word "Favorites" or "Bookmarks" appears and
- whether to use <A HREF=#DHTML>Dynamic HTML</A> on the screen.
- <LI>A <A HREF=#Menu>menu of services</A> is built up on the left-hand side. This is determined by client authentication.
- <LI>Finally, the page hit count is recalculated and presented to the user.
- </DIR>
- <P>
- <H2>Data Model</H2>
- The data requirements for this page are:
- <DIR>
- <LI>A text file of the latest headlines and URLs.
- <LI>Internet Information Server and Windows NT authentication data.
- </DIR>
- <P>
- <H2>Components Used</H2>
- The home page uses some standard IIS components such as Page Hit Count, Browser Capability and
- Permission Checker.
- <A NAME=#Menu></A>
- <H3>Using Authentication to Build the Menu</H3>
- The Permission Checker component is used to help build the list of menu
- items on the left of the homepage. It does this by comparing Windows NT File System (NTFS)
- Access Control Lists (ACLs) for the current user.
- <P>
- <CENTER>
- <!--AUTH EXPLANATION-->
- <TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 BORDER=1>
- <TR>
- <TH BGCOLOR="#C0C0C0">User Name</TH>
- <TH BGCOLOR="#C0C0C0">NTFS ACLs</TH>
- <TH BGCOLOR="#C0C0C0">Comment</TH>
- </TR>
-
- <TR>
- <TD VALIGN=TOP><EM>IUSR_xxxxxxx</EM></TD>
- <TD VALIGN=TOP><IMG SRC="images/ACL1.gif" ALT="Access Control List for Benefits"></TD>
- <TD VALIGN=TOP>
- <IMG SRC="images/AccessDeny.gif"><STRONG>-Deny</STRONG>
- <P>
- This is the recommended setting for the <STRONG>Benefits</STRONG> application in the
- <TT>ExAir/Benefits</TT> directory.
- <P>
- The IUSR_<I>xxxxxxx</I> is a special account set up for you by Internet Information Server
- when you install the product. By default it is only a member of the Windows NT
- <STRONG>Guests</STRONG> group. As you can see neither Guests nor IUSR_<I>xxxxxxx</I> are
- listed in the ACLs hence access is denied.
- <P>
- IUSR_<I>xxxxxxx</I> is the Windows NT account IIS uses when a user is authenticated with
- <STRONG>Anonymous Authentication</STRONG>.
- </TD>
- </TR>
-
- <TR>
- <TD VALIGN=TOP><EM>MichaelH</EM></TD>
- <TD VALIGN=TOP><IMG SRC="images/ACL2.gif" ALT="Access Control List for Site Admin"></TD>
- <TD VALIGN=TOP>
- <IMG SRC="images/AccessAllow.gif"><STRONG>-Allow</STRONG>
- <P>
- This is the recommended setting for the <STRONG>Site Administration</STRONG> application in the
- <TT>ExAir/SiteAdmin</TT> directory.
- <P>
- In this example it is assumed MichaelH is a member of the <STRONG>Power Users</STRONG> group on this
- computer, hence he has Change Access to the resource.
- <P>
- To have access to Windows NT account names you must turn off <STRONG>Anonymous Authentication</STRONG>.
- </TD>
- </TR>
- </TABLE>
- </CENTER>
- <!--END AUTH EXPLANATION-->
-
- <H3>To Allow Searching - That is the Question!</H3>
- If the sample site notes that the Microsoft Index Server data components are loaded then the
- Search option is enabled, otherwise it is not displayed. The
- <STRONG>IsIndexServerInstalled()</STRONG> function located in
- <TT><A HREF="../libGlobalFuncs.inc">libGlobalFuncs.inc</A></TT>
- performs this task.
- <P>
-
- <A NAME=#Applet></A>
- <H3>Scrolling Headlines Applet</H3>
- A Java applet called <STRONG>CoolHeadLines</STRONG> is used to scroll the latest headlines.
- When a user clicks on a headline, he or she is sent to the the appropriate URL and
- given more detail.
- <P>
- The headline text and URLs are determined by querying a file called
- <TT><A HREF="../pr/prFileList.txt">pr/prFileList.txt</A></TT>.
- <P>
- Each headline has three elements in the file:
- <DIR>
- <LI>Headline text
- <LI>URL to complete press release containing more information
- <LI>Category (used for IE4 channels)
- </DIR>
- <P>
- The following parameters are used for the applet:
- <P></FONT>
- </TD>
- </TR>
- <P>
-
- <TR>
- <TD>
- <CENTER>
- <!--JAVA APPLET EXPLANATION-->
- <TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 BORDER=1>
- <TR>
- <TH BGCOLOR="#C0C0C0">Parameter</TH>
- <TH BGCOLOR="#C0C0C0">Comment</TH>
- </TR>
- <TR>
- <TD><EM>BackColor</EM></TD>
- <TD>The color of the background in RGB format.</TD>
- </TR>
- <TR>
- <TD><EM>TextColor</EM></TD>
- <TD>The color of the headline text in RGB format.</TD>
- </TR>
- <TR>
- <TD><EM>HiliteTextColor</EM></TD>
- <TD>The color of the headline text when highlighted in RGB format.</TD>
- </TR>
- <TR>
- <TD><EM>ScrollDelay</EM></TD>
- <TD>Delay between each pixel scroll, measured in msec.</TD>
- </TR>
- <TR>
- <TD><EM>MessageDelay</EM></TD>
- <TD>Wait time before the next headline scrolls, measured in seconds.</TD>
- </TR>
- <TR>
- <TD><EM>NumItems</EM></TD>
- <TD>Number of headlines.</TD>
- </TR>
- <TR>
- <TD><EM>Text<STRONG>N</STRONG></EM></TD>
- <TD>The text for headline <EM><STRONG>N</STRONG></EM>.</TD>
- </TR>
- <TR>
- <TD><EM>URL<STRONG>N</STRONG></EM></TD>
- <TD>The URL for the full text of headline <EM><STRONG>N</STRONG></EM>.</TD>
- </TR>
- </TABLE>
- </CENTER>
- <!--END JAVA APPLET EXPLANATION-->
- </TD>
- </TR>
-
- <TR>
- <TD>
- <A NAME=#DHTML></A>
- <H2>Internet Explorer 4.0 Dynamic HTML</H2>
- Two aspects of the opening page include DHTML if the browser is IE4.0 or better. First, the
- sample site must determine this by using the Browser Capability component.
- <P>
- The two elements which change if the user is using IE4.0 are:
- <P>
- <CENTER>
- <!--DHTML EXPLANATION-->
- <TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 BORDER=1>
- <TR>
- <TH BGCOLOR="#C0C0C0">Feature</TH>
- <TH BGCOLOR="#C0C0C0">Comment</TH>
- </TR>
- <TR>
- <TD VALIGN=TOP>Flash Links</TD>
- <TD>
- IE4 has the ability to highlight a link as you move the mouse over it. However,
- it is also implemented in code also in case the browser has the option turned off.
- The code is implemented in <TT><A HREF="../libHighlight.inc">libHighlight.inc</A></TT>
- and is good example of how to handle DHTML events.
- </TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>Exploration Air Logo Scrolls Down</TD>
- <TD>
- The main logo scrolls down from off the screen whenever you go to the default screen.
- This is achieved by calling the <TT>StartGlide()</TT> function when the body loads.
- The function first makes the image visible then scrolls it down 10pixels at a time
- every 10 milliseconds until the top of the image (the <TT>pixelTop</TT> property) is
- at the top of the page.
- </TD>
- </TR>
- </TABLE>
- </CENTER>
- </TD>
- </TR>
- </TABLE>
- <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND INTRODUCTORY CONTENT-->
-
- <CENTER>
- <!--BEGIN LEGAL INFORMATION-->
- <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
- <TR>
- <TD>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1"><A HREF="../legal.htm">©1997 Microsoft Corporation. All rights reserved. Terms of Use.</A></FONT>
- </TD>
- </TR>
- </TABLE>
- </CENTER>
- <!--END LEGAL INFORMATION-->
-
- </TD>
- </TR>
- </TABLE>
-
- </BODY>
- </HTML>
- <!--END HTML-->
-
- <SCRIPT LANGUAGE="JavaScript">
- function openWindow(SourceURL)
- {
- // Set some defaults
- width=450;
- height=450;
-
- url = "code.asp?Source=" + SourceURL;
- window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
- }
- </SCRIPT>
-
-