home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / HIWLogin.asp < prev    next >
Text File  |  1997-11-01  |  7KB  |  160 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="How It Works Page">
  6. <META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
  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 TAGS-->
  10.  
  11. <TITLE>How The Logon Page 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 MAIN 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")%>"><IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Previous Page"  HSPACE=2 BORDER=0></A>
  32.             <FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA"><STRONG>
  33.             <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">B  A  C  K</A>
  34.             </STRONG></FONT>
  35.             <BR> 
  36.             <BR>
  37.             <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
  38.             <FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA"><A HREF="JavaScript:openWindow('../Freqflyer/login.asp')">V I E W   S O U R C E</A>
  39.             <BR></FONT>
  40.         </TD>
  41.  
  42.         <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
  43.             <BR CLEAR=ALL>
  44.             <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>   
  45.                 <TR>
  46.                     <TD VALIGN=top>
  47.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Logon Page Works</FONT>
  48.                         <P>
  49.                         <HR>
  50.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=3 COLOR="#000000">
  51.                         <H2>Functional Overview</H2>
  52.                         <TABLE BORDER=0>
  53.                             <TR>
  54.                                 <TD>
  55.                                 Before users can visit the pages of Exploration Air's Frequent Flyer site, they must log on. 
  56.                                 Users who already have a Frequent Flyer account use the Login.asp page 
  57.                                 to enter their frequent flyer number and password. Once they click on the Logon button, the
  58.                                 form is checked to see if all fields are filled correctly using a function called 
  59.                                 <TT>validate()</TT> written in JavaScript. 
  60.                                 If the user has entered a valid number in the Account
  61.                                 Number field, the form is submitted to itself. 
  62.                                 <P>
  63.                                 Login.asp then loads for a second time. Before it displays any HTML
  64.                                 it checks a hidden field in the form that was submitted and determines if this is a
  65.                                 submission request. Now the page sends the information received from the form to the
  66.                                 database by the use of a Visual Basic component called <TT>ExAir.Member</TT>. The component returns 
  67.                                 a value to the page to approve the Account Number/Password combination or to reject it. 
  68.                                 Based on this, the page either redirects the user to the Frequent Flyer Homepage, or displays a message
  69.                                 explaining that the password was invalid.
  70.                                 </TD>
  71.                                 <TD VALIGN=TOP>
  72.                                     <TABLE CELLPADDING=4 CELLSPACING=4>
  73.                                         <TR>
  74.                                             <TD BGCOLOR=#C0C0C0>
  75.                                                 <STRONG>How to Logon</STRONG>
  76.                                                 <P>
  77.                                                 <FONT SIZE=2>
  78.                                                 If you have just started using the Exploration Air sample site, there is only
  79.                                                 one account setup. Here are the details:
  80.                                                 <P>
  81.                                                 <STRONG>Name:</STRONG> Katie Jordan
  82.                                                 <STRONG>Account:</STRONG> 10001
  83.                                                 <STRONG>Password:</STRONG> password
  84.                                                 </FONT>
  85.                                             </TD>
  86.                                         </TR>
  87.                                     </TABLE>
  88.                                 </TD>
  89.                             </TR>
  90.                         </TABLE>
  91.                         <P>
  92.  
  93.                         <H2>Data Model</H2>
  94.                         The <STRONG>Member</STRONG> table of the database stores unique Account Numbers and their passwords. 
  95.                         This is the only data accessed from the login page.
  96.                         <P>
  97.  
  98.                         <H2>Components Used</H2>
  99.                         The <STRONG>ExAir</STRONG> component has a class called <STRONG>Member</STRONG> 
  100.                         which handles all information retrieval from the Member table of the database. The <STRONG>CheckPassword</STRONG> 
  101.                         method of the <STRONG>Member</STRONG> class is called. Three parameters are sent to this method: information on the location 
  102.                         of the database, the account number, and the password. CheckPassword returns a value
  103.                         of 1 if the password was correct and 0 if incorrect. The page then uses this information
  104.                         to redirect if appropriate.
  105.                         <P>
  106.                         The following image shows what the component looks like when it is installed in the Microsoft Transaction Server
  107.                         snap-In for Microsoft Management Console:
  108.                         <P>
  109.                         <CENTER>
  110.                         <IMG SRC="images/MMC1.jpg" HEIGHT=396 WIDTH=572  ALT="ExAir.Member in Microsoft Transaction Server" BORDER=0>
  111.                         <P>
  112.                         <STRONG>ExAir Component in the Microsoft Management Console Snap-In</STRONG>
  113.                         </CENTER>
  114.                         <P>
  115.  
  116.                         <H2>Transaction Usage</H2>
  117.                         The <STRONG>CheckPassword</STRONG> method of the <STRONG>Member</STRONG> class contains transaction code. 
  118.                         If this method encounters an error while trying to check the password in the database, 
  119.                         then the transaction is aborted.
  120.                         <P>
  121.                     </TD>
  122.                 </TR>
  123.             </TABLE>
  124.             </CENTER>
  125.             <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  126.  
  127.             <BR>
  128.             <BR>
  129.  
  130.             <CENTER>
  131.             <!--BEGIN LEGAL INFORMATION-->
  132.             <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
  133.             <TR>
  134.             <TD>
  135.             <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1"><A HREF="../legal.htm">©1997 Microsoft Corporation. All rights reserved. Terms of Use.</A></FONT>
  136.             <P>
  137.             </TD>
  138.             </TR>
  139.             </TABLE>
  140.             </CENTER>
  141.             <!--END LEGAL INFORMATION-->
  142.         </TD>
  143.     </TR>
  144. </TABLE>
  145.  
  146. </BODY>
  147. </HTML>
  148. <!--END HTML-->
  149.  
  150. <SCRIPT LANGUAGE="JavaScript">
  151. function openWindow(SourceURL)
  152. {
  153.     // Set some defaults
  154.     width=450;
  155.     height=450;
  156.  
  157.     url = "code.asp?Source=" + SourceURL;
  158.     window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
  159. }
  160. </SCRIPT>