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="How It Works Page">
- <META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
- <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
- <!--END META TAGS-->
-
- <TITLE>How The Logon Page 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 MAIN 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 SIZE=2 FACE="VERDANA, ARIAL, HELVETICA"><STRONG>
- <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">B A C K</A>
- </STRONG></FONT>
- <BR>
- <BR>
- <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
- <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>
- <BR></FONT>
- </TD>
-
- <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
- <BR CLEAR=ALL>
- <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>
- <TR>
- <TD VALIGN=top>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Logon Page Works</FONT>
- <P>
- <HR>
- <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=3 COLOR="#000000">
- <H2>Functional Overview</H2>
- <TABLE BORDER=0>
- <TR>
- <TD>
- Before users can visit the pages of Exploration Air's Frequent Flyer site, they must log on.
- Users who already have a Frequent Flyer account use the Login.asp page
- to enter their frequent flyer number and password. Once they click on the Logon button, the
- form is checked to see if all fields are filled correctly using a function called
- <TT>validate()</TT> written in JavaScript.
- If the user has entered a valid number in the Account
- Number field, the form is submitted to itself.
- <P>
- Login.asp then loads for a second time. Before it displays any HTML
- it checks a hidden field in the form that was submitted and determines if this is a
- submission request. Now the page sends the information received from the form to the
- database by the use of a Visual Basic component called <TT>ExAir.Member</TT>. The component returns
- a value to the page to approve the Account Number/Password combination or to reject it.
- Based on this, the page either redirects the user to the Frequent Flyer Homepage, or displays a message
- explaining that the password was invalid.
- </TD>
- <TD VALIGN=TOP>
- <TABLE CELLPADDING=4 CELLSPACING=4>
- <TR>
- <TD BGCOLOR=#C0C0C0>
- <STRONG>How to Logon</STRONG>
- <P>
- <FONT SIZE=2>
- If you have just started using the Exploration Air sample site, there is only
- one account setup. Here are the details:
- <P>
- <STRONG>Name:</STRONG> Katie Jordan
- <STRONG>Account:</STRONG> 10001
- <STRONG>Password:</STRONG> password
- </FONT>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- <P>
-
- <H2>Data Model</H2>
- The <STRONG>Member</STRONG> table of the database stores unique Account Numbers and their passwords.
- This is the only data accessed from the login page.
- <P>
-
- <H2>Components Used</H2>
- The <STRONG>ExAir</STRONG> component has a class called <STRONG>Member</STRONG>
- which handles all information retrieval from the Member table of the database. The <STRONG>CheckPassword</STRONG>
- method of the <STRONG>Member</STRONG> class is called. Three parameters are sent to this method: information on the location
- of the database, the account number, and the password. CheckPassword returns a value
- of 1 if the password was correct and 0 if incorrect. The page then uses this information
- to redirect if appropriate.
- <P>
- The following image shows what the component looks like when it is installed in the Microsoft Transaction Server
- snap-In for Microsoft Management Console:
- <P>
- <CENTER>
- <IMG SRC="images/MMC1.jpg" HEIGHT=396 WIDTH=572 ALT="ExAir.Member in Microsoft Transaction Server" BORDER=0>
- <P>
- <STRONG>ExAir Component in the Microsoft Management Console Snap-In</STRONG>
- </CENTER>
- <P>
-
- <H2>Transaction Usage</H2>
- The <STRONG>CheckPassword</STRONG> method of the <STRONG>Member</STRONG> class contains transaction code.
- If this method encounters an error while trying to check the password in the database,
- then the transaction is aborted.
- <P>
- </TD>
- </TR>
- </TABLE>
- </CENTER>
- <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
-
- <BR>
- <BR>
-
- <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>
- <P>
- </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>