Advertisement
lightxx

MSM765 Login Page for iOS devices

Sep 11th, 2013
866
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5.64 KB | None | 0 0
  1. <%
  2.     /* This function will initialize a bunch of access_* ASP variables. */
  3.     LoadAccessInformation();
  4.     /* Those variables are now accessible for ASP code:
  5.      * - access_free
  6.      * - access_purchase
  7.      * - etc... (see documentation for complete list).
  8.      */
  9.  
  10.     var ssl = GetHTTPProtocol() == "https";
  11. %>
  12. <?xml version="1.0" encoding="UTF-8" ?>
  13. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  14.        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  15. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  16.     <!--
  17.         *******************************************************************************
  18.  
  19.         I M P O R T A N T
  20.         - - - - - - - - -
  21.  
  22.         Do NOT copy and paste this code from a web browser "View Source" Window.
  23.  
  24.         The actual code contains server-side function calls which do not appear in a
  25.         "View Source" situation.
  26.  
  27.         Please refer to the supplied templates on the product CD.
  28.  
  29.         *******************************************************************************
  30.     -->
  31.     <head>
  32.         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  33.         <meta http-equiv="Expires" content="0" />
  34.         <meta http-equiv="Cache-Control" content="no-cache" />
  35.         <meta http-equiv="Pragma" content="no-cache" />
  36.         <title>Public Access - Login Page</title>
  37.         <link rel="stylesheet" type="text/css" href="/style.css"/>
  38.         <script type="text/javascript" language="JavaScript" src="/prototype.js"></script>
  39.         <script type="text/javascript" language="JavaScript" src="/sessionwindow.js"></script>
  40.         <script type="text/javascript" language="JavaScript" src="/setfocus.js"></script>
  41.         <script type="text/javascript" language="JavaScript">
  42.         <!--
  43.             function showsessionpageifnotsubscribe()
  44.             {
  45.                 var action = $F('access_type');
  46.                 var showSessionPage = false;
  47.  
  48.                 if (typeof(action) == 'string') {
  49.                     if ($F('access_type') != 'subscribe') {
  50.                         showSessionPage = true;
  51.                     }
  52.                 } else {
  53.                     showSessionPage = true;
  54.                 }
  55.  
  56.                 // fix by Thoams Heuberger, 2013. Disables the Session Page popup on iOS devices
  57.                 if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g))
  58.                     showSessionPage = false;
  59.                
  60.                 if (showSessionPage) {
  61.                     showsessionpage('<% write(GetWebFullURL("http")); %>/session.asp');
  62.                 }
  63.             }
  64.         //-->
  65.         </script>
  66.     </head>
  67.     <body onload="javascript:setfocus();">
  68.         <!-- Display company logo -->
  69.         <div id="logo">
  70.             <img src="/logo.gif" alt="HP ProCurve - Company Logo" />
  71.         </div>
  72.  
  73.         <div id="topAds">
  74.             <!-- Put your ads here -->
  75.             <div class="ads"><a href="http://www.procurve.com" target="_blank" title="Most cost-effective 802.11n migration"><img src="/ads.jpg" alt="Most cost-effective 802.11n migration" /></a></div>
  76.         </div>
  77.  
  78.         <div id="main">
  79.             <!-- Display error or warning messages -->
  80.             <div id="message"><% IncludeAsp("login_error_message.asp"); %></div>
  81.  
  82.             <!-- Display login form -->
  83.             <div class="boxed">
  84.                 <form action="/goform/HtmlLoginRequest" method="post" id="loginForm">
  85.                     <input type="hidden" name="error_url" value="/index.asp" />
  86.                     <input type="hidden" name="success_url" value="<% write(GetWebFullURL("http")); %>/transport.asp" />
  87.                     <input type="hidden" name="original_url" value="<%GetOriginalUrl();%>" />
  88.                     <input type="hidden" name="subscription_url" value="<% write(GetWebFullURL("https")); %>/subscribe.asp" />
  89.                     <input type="hidden" name="valid_fields" value="access_type username password" />
  90. <% ConditionalDisplay(!access_purchase && !access_free, "begin"); %>
  91.                     <input type="hidden" id="access_type" name="access_type" value="login" />
  92. <% ConditionalDisplay(!access_purchase && !access_free, "end"); %>
  93.  
  94.  
  95.                     <table width="100%" border="0"  cellspacing="0" cellpadding="4">
  96. <% ConditionalDisplay(access_purchase, "begin"); %>
  97.                         <tr>
  98.                             <td><input type="radio" id="access_type" name="access_type" value="subscribe" /></td>
  99.                             <td>Subscribe to the service</td>
  100.                         </tr>
  101. <% ConditionalDisplay(access_purchase, "end"); %>
  102. <% ConditionalDisplay(access_free, "begin"); %>
  103.                         <tr>
  104.                             <td><input type="radio" id="access_type" name="access_type" value="free_access" /></td>
  105.                             <td>Use Free Access service</td>
  106.                         </tr>
  107. <% ConditionalDisplay(access_free, "end"); %>
  108. <% ConditionalDisplay(access_purchase || access_free, "begin"); %>
  109.                         <tr>
  110.                             <td><input type="radio" id="access_type" name="access_type" value="login" checked="checked"/></td>
  111.                             <td>Existing User</td>
  112.                         </tr>
  113. <% ConditionalDisplay(access_purchase || access_free, "end"); %>
  114.                         <tr>
  115.                             <td>&nbsp;</td>
  116.                             <td>
  117.                                 <table border="0" width="100%" cellspacing="0" cellpadding="4">
  118.                                     <tr>
  119.                                         <td align="right"><label for="username">Username:</label></td>
  120.                                         <td><input type="text" name="username" maxlength="127" size="25" value="<% write(GetSessionVar("username")); %>"/></td>
  121.                                     </tr>
  122.                                     <tr>
  123.                                         <td align="right"><label for="password">Password:</label></td>
  124.                                         <td><input type="password" name="password" maxlength="127" size="25" /></td>
  125.                                     </tr>
  126.                                 </table>
  127.                             </td>
  128.                         </tr>
  129.                     </table>
  130.  
  131.                     <hr/>
  132.  
  133.                     <table border="0" width="100%" cellspacing="0" cellpadding="4">
  134.                         <tr>
  135.                             <td>
  136.                             </td>
  137.                             <td align="right"><input onclick="javascript:showsessionpageifnotsubscribe();" type="submit" name="login" id="loginButton" value="Proceed" /></td>
  138.                         </tr>
  139.                     </table>
  140.                 </form>
  141.             </div>
  142. <% ConditionalDisplay(!ssl, "begin"); %>
  143.             <div>
  144.                 <p><a href="<% write(GetWebFullURL("https")); %>/index.asp">Use the secure version of this form</a></p>
  145.             </div>
  146. <% ConditionalDisplay(!ssl, "end"); %>
  147.         </div>
  148.     </body>
  149. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement