home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / HIWExAirDefault.asp < prev    next >
Text File  |  1997-11-01  |  11KB  |  280 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2. <HTML>
  3. <HEAD> 
  4. <!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
  5. <META NAME="DESCRIPTION" CONTENT="Exploration Air's code explained in helpful terms">
  6. <META NAME="KEYWORDS" CONTENT="help, homepage, documentation,code, about, specification">
  7. <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
  8. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
  9. <!-- END META TAG INFORMATION -->
  10.  
  11. <TITLE>How The Exploration Air Homepage Works</TITLE>
  12. </HEAD>
  13.  
  14. <BODY  BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
  15. <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  16.  
  17. <!--Change link color on mouseover
  18.     Only if running Internet Explorer 4.0 or later -->
  19. <!--#include file=../libHighlight.inc-->
  20.  
  21. <!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND INTRODUCTORY CONTENT-->
  22. <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0  BGCOLOR="#000000" BORDER=0>
  23.     <TR>
  24.         <TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
  25.               <BR>
  26.             <IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171  ALT="Behind the Scenes at Exploration Air" BORDER=0 ></A>
  27.                <BR>
  28.                <BR>
  29.                <BR>
  30.             <!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
  31.             <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">
  32.             <IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Previous Page" HSPACE=2 BORDER=0></A>
  33.              <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2><STRONG>
  34.              <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">
  35.             B  A  C  K</A></STRONG>
  36.             </FONT>
  37.                <BR> 
  38.                <BR>
  39.             <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
  40.                <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  41.             <A HREF="JavaScript:openWindow('../default.asp')">V I E W           S O U R C E</A></FONT>
  42.         </TD>
  43.  
  44.         <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=TOP>
  45.                <BR CLEAR=ALL>
  46.             <!--BEGIN NESTED TABLE HOLDING EXPLANATORY CONTENT-->
  47.                <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>   
  48.                 <TR>
  49.                      <TD VALIGN=TOP>
  50.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Exploration Air Homepage Works</FONT>
  51.                         <HR>
  52.                         <H2>Functional Overview</H2>
  53.                         The homepage is the main entry point to the Exploration Air web site. On the surface it looks quite simple, 
  54.                         however it makes use of many technologies such as Active Server Pages (ASP), components, 
  55.                         Java and file access.
  56.                         <P>
  57.                         When the user accesses the homepage, a number of things happen:
  58.                         <DIR>
  59.                             <LI>A <A HREF=#Applet>Java applet</A> is populated from a text file with the latest headlines and URLs of the full text.
  60.                             <LI>The browser type is ascertained; this determines whether word "Favorites" or "Bookmarks" appears and 
  61.                                 whether to use <A HREF=#DHTML>Dynamic HTML</A> on the screen.
  62.                             <LI>A <A HREF=#Menu>menu of services</A> is built up on the left-hand side. This is determined by client authentication.
  63.                             <LI>Finally, the page hit count is recalculated and presented to the user.
  64.                         </DIR>
  65.                         <P>
  66.                         <H2>Data Model</H2>
  67.                         The data requirements for this page are:
  68.                         <DIR>
  69.                             <LI>A text file of the latest headlines and URLs.
  70.                             <LI>Internet Information Server and Windows NT authentication data.
  71.                         </DIR>
  72.                         <P>
  73.                         <H2>Components Used</H2>
  74.                         The home page uses some standard IIS components such as Page Hit Count, Browser Capability and 
  75.                         Permission Checker. 
  76.                         <A NAME=#Menu></A>
  77.                         <H3>Using Authentication to Build the Menu</H3>
  78.                         The Permission Checker component is used to help build the list of menu 
  79.                         items on the left of the homepage. It does this by comparing Windows NT File System (NTFS) 
  80.                         Access Control Lists (ACLs) for the current user.
  81.                         <P>
  82.                         <CENTER>
  83.                         <!--AUTH EXPLANATION-->
  84.                         <TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 BORDER=1>
  85.                             <TR>
  86.                               <TH BGCOLOR="#C0C0C0">User Name</TH>
  87.                               <TH BGCOLOR="#C0C0C0">NTFS ACLs</TH>
  88.                               <TH BGCOLOR="#C0C0C0">Comment</TH>
  89.                             </TR>
  90.  
  91.                             <TR>
  92.                               <TD VALIGN=TOP><EM>IUSR_xxxxxxx</EM></TD>
  93.                               <TD VALIGN=TOP><IMG SRC="images/ACL1.gif" ALT="Access Control List for Benefits"></TD>
  94.                               <TD VALIGN=TOP>
  95.                                 <IMG SRC="images/AccessDeny.gif"><STRONG>-Deny</STRONG>
  96.                                 <P>
  97.                                 This is the recommended setting for the <STRONG>Benefits</STRONG> application in the 
  98.                                 <TT>ExAir/Benefits</TT> directory.
  99.                                 <P>
  100.                                 The IUSR_<I>xxxxxxx</I> is a special account set up for you by Internet Information Server 
  101.                                 when you install the product. By default it is only a member of the Windows NT 
  102.                                 <STRONG>Guests</STRONG> group. As you can see neither Guests nor IUSR_<I>xxxxxxx</I> are
  103.                                 listed in the ACLs hence access is denied.
  104.                                 <P>
  105.                                 IUSR_<I>xxxxxxx</I> is the Windows NT account IIS uses when a user is authenticated with 
  106.                                 <STRONG>Anonymous Authentication</STRONG>.
  107.                               </TD>
  108.                             </TR>
  109.  
  110.                             <TR>
  111.                               <TD VALIGN=TOP><EM>MichaelH</EM></TD>
  112.                               <TD VALIGN=TOP><IMG SRC="images/ACL2.gif" ALT="Access Control List for Site Admin"></TD>
  113.                               <TD VALIGN=TOP>
  114.                                 <IMG SRC="images/AccessAllow.gif"><STRONG>-Allow</STRONG>
  115.                                 <P>
  116.                                 This is the recommended setting for the <STRONG>Site Administration</STRONG> application in the 
  117.                                 <TT>ExAir/SiteAdmin</TT> directory.
  118.                                 <P>
  119.                                 In this example it is assumed MichaelH is a member of the <STRONG>Power Users</STRONG> group on this
  120.                                 computer, hence he has Change Access to the resource.
  121.                                 <P>
  122.                                 To have access to Windows NT account names you must turn off <STRONG>Anonymous Authentication</STRONG>.
  123.                               </TD>
  124.                             </TR>
  125.                         </TABLE>
  126.                         </CENTER>
  127.                         <!--END AUTH EXPLANATION-->
  128.  
  129.                         <H3>To Allow Searching - That is the Question!</H3>
  130.                         If the sample site notes that the Microsoft Index Server data components are loaded then the
  131.                         Search option is enabled, otherwise it is not displayed. The  
  132.                         <STRONG>IsIndexServerInstalled()</STRONG> function located in 
  133.                         <TT><A HREF="../libGlobalFuncs.inc">libGlobalFuncs.inc</A></TT> 
  134.                         performs this task.
  135.                         <P>
  136.  
  137.                         <A NAME=#Applet></A>
  138.                         <H3>Scrolling Headlines Applet</H3>
  139.                         A Java applet called <STRONG>CoolHeadLines</STRONG> is used to scroll the latest headlines.    
  140.                         When a user clicks on a headline, he or she is sent to the the appropriate URL and 
  141.                         given more detail.
  142.                         <P>
  143.                         The headline text and URLs are determined by querying a file called 
  144.                         <TT><A HREF="../pr/prFileList.txt">pr/prFileList.txt</A></TT>. 
  145.                         <P>
  146.                         Each headline has three elements in the file:
  147.                         <DIR>
  148.                             <LI>Headline text
  149.                             <LI>URL to complete press release containing more information
  150.                             <LI>Category (used for IE4 channels)
  151.                         </DIR>
  152.                         <P>
  153.                         The following parameters are used for the applet:
  154.                         <P></FONT>
  155.                       </TD>
  156.                 </TR>
  157.                 <P>
  158.  
  159.                 <TR>
  160.                     <TD>
  161.                         <CENTER>
  162.                         <!--JAVA APPLET EXPLANATION-->
  163.                         <TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 BORDER=1>
  164.                             <TR>
  165.                               <TH BGCOLOR="#C0C0C0">Parameter</TH>
  166.                               <TH BGCOLOR="#C0C0C0">Comment</TH>
  167.                             </TR>
  168.                             <TR>
  169.                               <TD><EM>BackColor</EM></TD>
  170.                               <TD>The color of the background in RGB format.</TD>
  171.                             </TR>
  172.                             <TR>
  173.                               <TD><EM>TextColor</EM></TD>
  174.                               <TD>The color of the headline text in RGB format.</TD>
  175.                             </TR>
  176.                             <TR>
  177.                               <TD><EM>HiliteTextColor</EM></TD>
  178.                               <TD>The color of the headline text when highlighted in RGB format.</TD>
  179.                             </TR>
  180.                             <TR>
  181.                               <TD><EM>ScrollDelay</EM></TD>
  182.                               <TD>Delay between each pixel scroll, measured in msec.</TD>
  183.                             </TR>
  184.                             <TR>
  185.                               <TD><EM>MessageDelay</EM></TD>
  186.                               <TD>Wait time before the next headline scrolls, measured in seconds.</TD>
  187.                             </TR>
  188.                             <TR>
  189.                               <TD><EM>NumItems</EM></TD>
  190.                               <TD>Number of headlines.</TD>
  191.                             </TR>
  192.                             <TR>
  193.                               <TD><EM>Text<STRONG>N</STRONG></EM></TD>
  194.                               <TD>The text for headline <EM><STRONG>N</STRONG></EM>.</TD>
  195.                             </TR>
  196.                             <TR>
  197.                               <TD><EM>URL<STRONG>N</STRONG></EM></TD>
  198.                               <TD>The URL for the full text of headline <EM><STRONG>N</STRONG></EM>.</TD>
  199.                             </TR>
  200.                         </TABLE>
  201.                         </CENTER>
  202.                         <!--END JAVA APPLET EXPLANATION-->
  203.                     </TD>
  204.                 </TR>
  205.  
  206.                 <TR>
  207.                     <TD>
  208.                         <A NAME=#DHTML></A>
  209.                         <H2>Internet Explorer 4.0 Dynamic HTML</H2>
  210.                         Two aspects of the opening page include DHTML if the browser is IE4.0 or better. First, the 
  211.                         sample site must determine this by using the Browser Capability component. 
  212.                         <P>
  213.                         The two elements which change if the user is using IE4.0 are:
  214.                         <P>
  215.                         <CENTER>
  216.                         <!--DHTML EXPLANATION-->
  217.                         <TABLE ALIGN=CENTER WIDTH=90% CELLPADDING=4 BORDER=1>
  218.                             <TR>
  219.                               <TH BGCOLOR="#C0C0C0">Feature</TH>
  220.                               <TH BGCOLOR="#C0C0C0">Comment</TH>
  221.                             </TR>
  222.                             <TR>
  223.                                 <TD VALIGN=TOP>Flash Links</TD>
  224.                                 <TD>
  225.                                     IE4 has the ability to highlight a link as you move the mouse over it. However, 
  226.                                     it is also implemented in code also in case the browser has the option turned off.
  227.                                     The code is implemented in <TT><A HREF="../libHighlight.inc">libHighlight.inc</A></TT>
  228.                                     and is good example of how to handle DHTML events.
  229.                                 </TD>
  230.                             </TR>
  231.                             <TR>
  232.                                 <TD VALIGN=TOP>Exploration Air Logo Scrolls Down</TD>
  233.                                 <TD>
  234.                                     The main logo scrolls down from off the screen whenever you go to the default screen.
  235.                                     This is achieved by calling the <TT>StartGlide()</TT> function when the body loads.
  236.                                     The function first makes the image visible then scrolls it down 10pixels at a time
  237.                                     every 10 milliseconds until the top of the image (the <TT>pixelTop</TT> property) is
  238.                                     at the top of the page.
  239.                                 </TD>
  240.                             </TR>
  241.                         </TABLE>
  242.                         </CENTER>
  243.                     </TD>
  244.                 </TR>
  245.             </TABLE>      
  246.             <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND INTRODUCTORY CONTENT-->
  247.  
  248.             <CENTER>
  249.             <!--BEGIN LEGAL INFORMATION-->
  250.             <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
  251.                 <TR>
  252.                     <TD>
  253.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1"><A HREF="../legal.htm">©1997 Microsoft Corporation. All rights reserved. Terms of Use.</A></FONT>
  254.                   </TD>
  255.                  </TR>
  256.             </TABLE>
  257.             </CENTER>
  258.             <!--END LEGAL INFORMATION-->
  259.  
  260.       </TD>
  261.     </TR>
  262. </TABLE>
  263.  
  264. </BODY>
  265. </HTML>
  266. <!--END HTML-->
  267.  
  268. <SCRIPT LANGUAGE="JavaScript">
  269. function openWindow(SourceURL)
  270. {
  271.     // Set some defaults
  272.     width=450;
  273.     height=450;
  274.  
  275.     url = "code.asp?Source=" + SourceURL;
  276.     window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
  277. }
  278. </SCRIPT>
  279.  
  280.