home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 9 / IOPROG_9.ISO / contrib / iis4 / iis4_03.cab / default.asp7 < prev    next >
Encoding:
Text File  |  1997-08-29  |  2.9 KB  |  130 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <%Option Explicit %>
  3.  
  4. <%
  5.     Const L_TITLE_TEXT = "Internet Service Manager (HTML) "
  6. %>
  7.  
  8. <%
  9. On Error Resume Next
  10. Dim browserobj, browserkey, browserok
  11. Set browserobj=Server.CreateObject("MSWC.BrowserType") 
  12. browserkey = "Unknown Browser"
  13. Session("IsIE") = False
  14.  
  15. if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then
  16.     if browserobj.MajorVer=3 then
  17.         browserok=true
  18.         browserKey = "IE3"
  19.         Session("IsIE") = True
  20.     else
  21.         if browserobj.MajorVer=4 then
  22.             browserok=true
  23.             browserKey = "IE4"        
  24.             Session("IsIE") = True
  25.             
  26.         else
  27.             browserok=false
  28.         end if
  29.     end if
  30. else
  31.     if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"Mozilla") then
  32.             browserok=true        
  33.             browserKey = "Netscape"                
  34.     end if
  35. end if
  36.  
  37. Session("Browser") = browserkey
  38.  
  39. %>
  40.  
  41. <% if browserok then %>    
  42.  
  43.     <%
  44.     if Request.QueryString("FONTSIZE") <> "" then 
  45.         Response.Cookies("HTMLA")("FONTSIZE")=Request.QueryString("FONTSIZE") 
  46.         Response.Cookies("HTMLA").expires=#December 31, 2000 1:00:00 AM#        
  47.         Session("FONTSIZE")=Request.QueryString("FONTSIZE")
  48.         Session.timeout=200        
  49.     else
  50.         Session("FONTSIZE") = Request.Cookies("HTMLA")("FONTSIZE")
  51.     end if
  52.     %>
  53.     
  54.     <html>        
  55.     
  56.     <% if Session("IsIE") then %>
  57.     <script language="JavaScript">
  58.         // Determine the version number.
  59.         var version;
  60.         var requiredVersion=2;
  61.         if (typeof(ScriptEngineMajorVersion) + ""=="undefined")
  62.             version=1;
  63.         else
  64.             version=ScriptEngineMajorVersion();
  65.     
  66.         // Prompt client and navigate to download page.
  67.         if ((version < requiredVersion) &&
  68.             confirm("This page requires a newer version of LiveScript to view. Do you want to upgrade now?")) 
  69.         {
  70.             location.href="http://www.microsoft.com/msdownload/scripting.htm"
  71.         }
  72.     
  73.     </script>
  74.     <% end if %>
  75.     
  76.     
  77.     
  78.     <head>
  79.     <title><%= L_TITLE_TEXT %></title>
  80.     </head>
  81.     
  82.     <SCRIPT LANGUAGE="JavaScript">
  83.     
  84.     if (newBrowser()){
  85.         self.location.href = "iisnew.asp";
  86.     }
  87.     else{
  88.         self.location.href = "iis.asp";
  89.     }
  90.     
  91.     function newBrowser(){
  92.         //Checks for existence of cookie
  93.         cookiestr="<%= Session("FONTSIZE") %>"
  94.         brwser="<%= Session("BROWSER") %>"        
  95.         return (cookiestr == "");
  96.     }
  97.  
  98.     </SCRIPT>
  99.     
  100.     <body>
  101.     </body>
  102.  
  103. <% else %>
  104.  
  105.     <html>        
  106.     <body bgcolor="#000000" text="#FFFFFF" topmargin="0" leftmargin="0">
  107.     
  108.     <table cellpadding="0" width="600">
  109.     <tr>
  110.     <td valign="TOP" colspan="2">
  111.         <img src="images/ismhd.gif" width="285" height="15">
  112.     </td>
  113.     </tr>
  114.     <tr>
  115.     <td height="1100" valign="top" width="200" background="images/iisnav.gif">
  116.     </td>
  117.     
  118.     <td valign="top">
  119.     <img src="images/ism.gif" width="160" height="76"><p>
  120.     <font face="HELV" size="1">
  121.     Sorry, your web browser cannot administer iis. <p>
  122.     We recommend that you install the current released version of IE <a href="http://www.microsoft.com/ie/default.asp">Download it now!</a>
  123.     </font>
  124.     </td>
  125.     </tr>
  126.     </table>
  127.     
  128.     </body>
  129. <% end if %>
  130. </html>