home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / CHIPCD_3_98.iso / software / testsoft / exchange / webdata / usa / logon.asp < prev    next >
Text File  |  1997-08-25  |  9KB  |  283 lines

  1. <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
  2. <!-- Microsoft Outlook Web Access-->
  3. <!-- Logon.asp-->
  4. <!-- Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->
  5. <!-- #include file='constant.inc' -->
  6. <!-- #include file='lib/session.inc'-->
  7.  
  8. <% 
  9. urlNewWindow  = Request.QueryString("newwindow")
  10.  
  11. set objRenderApp = Application( bstrRenderApp ) 
  12.  
  13. Function isSupportedBrowser()
  14.     ' What browser requested this page?
  15.     set szClient = Request.ServerVariables("HTTP_USER_AGENT")
  16.  
  17.     ' Are we using Microsoft Internet Explorer?
  18.     nPos = Instr(szClient, "MSIE")
  19.  
  20.     ' Strip everything left of the major version #
  21.     if (nPos <> 0) then      
  22.         ' MSIE Agents are of the form "Mozilla/#.# (compatable; MSIE x.#; Platform)" 
  23.         szVersion = Right(szClient, len(szClient) - nPos - len("MSIE")) 
  24.       else
  25.         ' NS Nav Agents are of the form "Mozilla/x.# (Platform; I; Processor)" 
  26.         szVersion = Right(szClient, len(szClient) - len("Mozilla/"))
  27.     end if
  28.  
  29.     ' Strip everything right of the major version #
  30.     nPos = Instr(szVersion, ".")
  31.     szVersion = Left(szVersion, nPos - 1)     
  32.  
  33.     ' If your browser is version 3.x or higher, your supported
  34.     if IsNumeric(szVersion) then
  35.         if CInt(szVersion) >= 3 then
  36.             isSupportedBrowser = true
  37.         else
  38.             isSupportedBrowser = false 
  39.         End If
  40.     Else
  41.         isSupportedBrowser = false 
  42.     End If
  43.  
  44. End Function
  45.  
  46. Session("iFontSize")=2  'Default font size
  47.  
  48. If isMSIE then
  49.    If isWin16 then
  50.       Session("nTWfactor") = .138
  51.       Session("nTAfactor") = .125
  52.       Session("nTARows") = 19
  53.    ElseIf isMac Then
  54.       Session("nTWfactor")= .173
  55.       Session("nTAfactor")= .169
  56.       Session("nTARows")=27
  57.    Else
  58.       If getVersion>=4.0 Then
  59.          Session("nTWfactor")= .130
  60.          Session("nTAfactor") = .119
  61.          Session("nTARows")= 17
  62.       Else
  63.          Session("nTWfactor")= .189
  64.          Session("nTAfactor") = .20
  65.          Session("nTARows")= 22
  66.       End If
  67.    End If
  68. Else
  69.    If isSun=4 Then
  70.       Session("nTWfactor") = .095
  71.       Session("nTAfactor") = .084
  72.       Session("nTARows") = 13
  73.    ElseIf isSun=3 Then
  74.       Session("nTWfactor") = .176
  75.       Session("nTAfactor") = .152
  76.       Session("nTARows") = 23
  77.    ElseIf isMac Then
  78.       Session("nTWfactor") = .155
  79.       Session("nTAfactor") = .156
  80.       Session("nTARows") = 24
  81.    ElseIf isUnix Then    
  82.       Session("nTWfactor") = .146
  83.       Session("nTAfactor") = .152'.132
  84.       Session("nTARows") = 23
  85.    Else 'win16 and win32
  86.       If getVersion>=4.0 Then
  87.          Session("iFontSize")=3
  88.          Session("nTWfactor") = .120
  89.          Session("nTAfactor") = .120
  90.          Session("nTARows") = 17
  91.       Else
  92.          Session("nTWfactor") = .137
  93.          Session("nTAfactor") = .118
  94.          Session("nTARows") = 15
  95.       End If    
  96.    End If
  97. End If
  98. %>
  99.  
  100. <HTML>
  101. <HEAD>
  102. <TITLE>Microsoft Outlook Web Access - Logon</TITLE>
  103.  
  104. <SCRIPT Language="JavaScript">
  105. <!--
  106. var L_strMailboxPlease_Message = "Please type in your Mailbox Name.";
  107. var L_strValidMailbox_Message = "Mailbox name contains invalid characters.";
  108. var L_SessionTimedOut_Message = "Your session has timed out.  If you wish to continue, you will need to log back on.";
  109.  
  110. <% If urlNewWindow="1" Then %>
  111.     alert(L_SessionTimedOut_Message);
  112. <% End If %>
  113.  
  114. function sendForm(bAnon) {
  115.     if (!bAnon)
  116.     {
  117.         if (document.logonForm.mailbox.value=="") 
  118.         {
  119.             alert(L_strMailboxPlease_Message ) 
  120.         }
  121.         else if (((document.logonForm.mailbox.value.indexOf("\\") != -1) ||
  122.                  (document.logonForm.mailbox.value.indexOf("/") != -1)) ||
  123.                  (document.logonForm.mailbox.value.indexOf(";") != -1)) 
  124.         {
  125.             alert(L_strValidMailbox_Message)
  126.         }   
  127.         else
  128.         {
  129.             document.logonForm.submit();
  130.         }    
  131.     }
  132.     else
  133.     {
  134.         document.logonForm.mailbox.value="";
  135.         document.logonForm.submit();
  136.     }
  137. }
  138.  
  139. function openNewWindow(fileName,windowName,theWidth,theHeight) {
  140.     window.open(fileName,windowName,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width="+theWidth+",height="+theHeight)
  141. }
  142.  
  143. //-->
  144. </SCRIPT>
  145. </HEAD>
  146.  
  147. <BODY background="back.jpg" bgcolor=#ffff99 text=000000 link=000000 vlink=000000>
  148. <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">
  149. <TR><TD VALIGN=TOP ROWSPAN="2">
  150. <A HREF="http://www.microsoft.com/outlook" ALT="Microsoft Outlook">
  151. <IMG SRC="part1.gif" ALIGN=LEFT HSPACE=0 VSPACE=0 BORDER=0 WIDTH=273 HEIGHT=188 ALT="Microsoft Outlook">
  152. </A>
  153. </TD><TD VALIGN=TOP>
  154. <A HREF="http://www.microsoft.com/outlook" ALT="Microsoft Outlook">
  155. <IMG SRC="part2.gif" ALIGN=LEFT HSPACE=0 VSPACE=0 BORDER=0 WIDTH=296 HEIGHT=169 ALT="Microsoft Outlook">
  156. </A>
  157. </TD></TR>
  158. <TR><TD>for Microsoft (R) Exchange (TM) Server</TD></TR>
  159. </TABLE>
  160. <% if isSupportedBrowser() then %>
  161. <form name="logonForm" action="LogonFrm.asp" method="GET" onSubmit="sendForm(false);return(false);">
  162. <% If urlNewWindow<>"" Then %>
  163. <input type="hidden" name="isnewwindow" value="1">
  164. <% Else %>
  165. <input type="hidden" name="isnewwindow" value="0">
  166. <% End If %>
  167.  
  168. <table cellpadding=0 cellspacing=0 border=0 width=100% >
  169.  
  170. <tr valign=top>
  171.     <td width=2% rowspan=2> </td>
  172.  
  173.     <td width=52% colspan=2 rowspan=2>
  174.     <font <%=bstrFace%> size=2 color=black>
  175.     Version 5.5<br>
  176.     Microsoft (R) Outlook (TM) Web Access is 
  177.     a Microsoft Exchange (TM) Active Server Application
  178.     that gives you private access to your Microsoft Outlook or Microsoft Exchange personal e-mail
  179.     account so that you can view your Inbox from any Web Browser. It also allows you to view    
  180.     Exchange server public folders and the Address Book from the World Wide Web.
  181.     Anyone can post messages anonymously to public folders or search for users in the 
  182.     Address Book. For more information about this Outlook product, <a href="JavaScript:parent.openNewWindow('help/welcome.htm','inlineHelpWindow',600,500)">click here.</a> 
  183.     </font>
  184. <br>
  185.     <table width=100%>
  186.     <tr valign=top>
  187.     <td  align=center valign=middle>
  188.     <a href="http://www.microsoft.com/ie"><img border=0 src="msie.gif" width=88 height=31 ALT="Microsoft Internet Explorer"></a>
  189.     </td>
  190.     <td  align=center valign=middle>    
  191.     <a href="http://www.microsoft.com/products"><img border=0 src="msprod.gif" width=88 height=31 ALT="Powered by Microsoft products"></a>
  192.     </td>
  193.     </tr>
  194.     </table>
  195.     </td>
  196.  
  197.     <td width=2% rowspan=2> </td>
  198.  
  199. <% If objRenderApp.ConfigParameter("HTTP Enabled") = True Then %>
  200.     <td align=right  width=15%>
  201.     <font <%=bstrFace%> size=4><b>Log On</b></font>
  202.     </td><td align=left  width=15%>
  203.     <INPUT TYPE=text NAME=mailbox VALUE="" MAXLENGTH=60 SIZE=20>
  204.     <br><font <%=bstrFace%> size=2>
  205.     Exchange Users Only:<br> Type your alias and then <a href="JavaScript:sendForm(false)">
  206.     click here</a> to connect to your personal e-mail account.</font>
  207.     </td> 
  208.  
  209.  
  210.     <td width=2% rowspan=2> </td>
  211.  
  212.     </tr>
  213.  
  214.     <% If objRenderApp.ConfigParameter("Anonymous Access") = True  Then %>
  215.     <tr valign=top>
  216.         <td align=right>
  217.         <font <%=bstrFace%> size=4><b>Public Access</b></font>
  218.     </td><td align=left>
  219.         <font size=2><a href="JavaScript:sendForm(true)">Click here</a> to:<br>
  220.         browse Public Folders,
  221.         <% If objRenderApp.ConfigParameter("Publish GAL") = True Then %>
  222.         find names in the Address Book, 
  223.         <% End If %>
  224.         and post messages anonymously.</font>
  225.         </td>
  226.     </tr>
  227.     <%ElseIf objRenderApp.ConfigParameter("Publish GAL") = True then%>
  228.      <tr valign=top>
  229.         <td align=right>
  230.         <font <%=bstrFace%> size=4><b>Public Access</b></font>
  231.      </td><td align=left>
  232.         <font size=2><a href="JavaScript:sendForm(true)">Click here</a> to:<br>
  233.         find names in the Address Book.
  234.      </tr>
  235.     <%End If %>
  236.  
  237. <tr>
  238. <td width=2%></td>
  239. </tr>
  240. <% Else %>
  241. <tr>
  242.     <td width=42% >
  243.     <font <%=bstrFace%> size=4><b>Sorry!</b></font><br>
  244.     <img src="invisibl.gif" vspace=2 border=0><br> <!-- Used for vertical spacing -->
  245.     <font <%=bstrFace%> size=2>The Microsoft Exchange Server is down or the HTTP Service has been disabled by an administrator. Please try your request again later.</font><br>
  246.     </td>
  247. </tr>
  248. <% End If %>
  249. </table>
  250.  
  251. <% If objRenderApp.ConfigParameter("HTTP Enabled") = True Then %>
  252.     <script language="JavaScript">
  253.         document.logonForm.mailbox.focus()
  254.     </script>
  255. <% End If %>
  256.  
  257. <% End If %>
  258.  
  259. <table width=100%>
  260. <tr>
  261.  
  262. <% if isSupportedBrowser() then %>
  263. <% Else %>
  264. <td>
  265.     <font <%=bstrFace%> size=2>We're sorry. Microsoft Outlook Web Access requires a
  266.     web browser that supports frames and JavaScript, such as Microsoft 
  267.     Internet Explorer 3.0 or Netscape Navigator 3.0. Click  <a href="http://www.microsoft.com/ie/download">here</a> to download the latest version of 
  268.     <a href="http://www.microsoft.com/ie"><b>Internet Explorer</b></a> for free at 
  269.     <a href="http://www.microsoft.com/ie/download"><b>http://www.microsoft.com/ie/download</b></a>.
  270. </td>
  271. <% End If %>
  272.  
  273.  
  274.     <td rowspan=2 width=2%></td>
  275. </tr>
  276. </table>
  277.  
  278. <%Set objRenderApp = Nothing%>
  279.  
  280. </body>
  281. </html>
  282.  
  283.