Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

285 lines
6.5 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="default.str"-->
  5. <!--#include file="iisetfnt.inc"-->
  6. <%
  7. dim hackfor5
  8. hackfor5 = False
  9. function MinVer(browserver,brwminver)
  10. MinVer = (browserver >= brwminver)
  11. end function
  12. function GetBrowserVer(browserstr)
  13. dim browserver, i, curchr
  14. browserver = ""
  15. for i = 1 to len(browserstr)
  16. curchr = Mid(browserstr, i,1)
  17. if isNumeric(curchr) or curchr = "." then
  18. browserver = browserver & curchr
  19. end if
  20. if browserver <> "" and not (isNumeric(curchr) or curchr = ".") then
  21. exit for
  22. end if
  23. next
  24. GetBrowserVer = browserver
  25. end function
  26. On Error Resume Next
  27. Dim browserobj, browserkey, browserok,browserver,agentstr
  28. if Request.Querystring("browserok") <> "" or Request.QueryString("FONTSIZE") <> "" then
  29. browserok = True
  30. else
  31. browserkey = "Unknown Browser"
  32. agentstr = Request.ServerVariables("HTTP_USER_AGENT")
  33. Session("CanBrowse") = True
  34. Session("ListSort") = True
  35. Session("FONTSCALE") = L_DEFFONTSCALE_TEXT
  36. Session("FONTFACE") = L_DEFTEXTFONT_TEXT
  37. Session("FONTPOINT") = L_DEFFONTPOINT
  38. Session("MENUFONT") = L_DEFMENUFONT_TEXT
  39. Session("MENUFONTSIZE") = L_DEFMENUFONTPOINT
  40. Session("MENUBODY") = "<BODY background='images/greycube.gif' TEXT = 'White' LINK='White' VLINK='White' ALINK='#66CCCC' TOPMARGIN=0 LEFTMARGIN=0>"
  41. Session("DEFINPUTSTYLE") = L_DEFINPUTSTYLE
  42. Session("IE3Layout") = False
  43. Session("IE4Layout") = False
  44. Session("hasDHTML") = False
  45. Session("hasStyles") = True
  46. Session("BGCOLOR") = "Silver"
  47. Session("BrowserVer") = ""
  48. Session("BrowserVScalePct") = 100
  49. Session("BrowserHScalePct") = 100
  50. Session("BrowserTBScalePct") = 100
  51. if Instr(agentstr, "MSIE") then
  52. curLocale = GetLocale
  53. SetLocale("en-us")
  54. browserver = CInt(GetBrowserVer(Mid(agentstr,InStr(agentstr,"MSIE"))))
  55. SetLocale(curLocale)
  56. 'check for mac... we will warn users on pre IE4
  57. if InStr(agentstr, "Mac") > 0 then
  58. browserok=MinVer(browserver,4)
  59. else
  60. browserok=MinVer(browserver,3)
  61. end if
  62. browserKey = "IE" & browserver
  63. Session("BrowserVer") = browserver
  64. Session("IsIE") = True
  65. if browserver > 3 then
  66. Session("IE4Layout") = True
  67. Session("hasDHTML") = True
  68. end if
  69. else
  70. Session("IsIE") = False
  71. if Instr(agentstr,"Mozilla") then
  72. SetLocale("en-us")
  73. browserver = CInt(GetBrowserVer(agentstr))
  74. SetLocale(curLocale)
  75. browserKey = "Netscape"
  76. Session("BrowserVer") = browserver
  77. if InStr(agentstr, "Win") > 0 then
  78. browserok=MinVer(browserver,3)
  79. elseif InStr(agentstr, "Mac") > 0 then
  80. browserok=MinVer(browserver,4)
  81. Session("CanBrowse") = False
  82. Session("IsMac") = True
  83. else
  84. browserok=MinVer(browserver,4)
  85. Session("IsUNIX") = True
  86. Session("hasStyles") = False
  87. Session("ListSort") = False
  88. Session("FONTSCALE") = L_UNIXFONTSCALE
  89. Session("FONTFACE") = L_UNIXTEXTFONT_TEXT
  90. Session("FONTPOINT") = L_UNIXFONTPOINT
  91. Session("MENUFONT") = L_UNIXMENUFONT_TEXT
  92. Session("MENUFONTSIZE") = L_UNIXFONTPOINT
  93. if browserver > 4 then
  94. Session("DEFINPUTSTYLE")= ""
  95. else
  96. Session("DEFINPUTSTYLE") = L_UNIXINPUTSTYLE
  97. end if
  98. end if
  99. if browserver < 4 then
  100. Session("BrowserVScalePct") = 128
  101. Session("BrowserHScalePct") = 104
  102. else
  103. Session("BrowserVScalePct") = 125
  104. Session("BrowserHScalePct") = 104
  105. end if
  106. Session("BrowserTBScalePct") = 75
  107. else
  108. browserok = false
  109. end if
  110. end if
  111. Session("Browser") = browserkey
  112. end if
  113. %>
  114. <% if browserok then %>
  115. <%
  116. if Request.QueryString("FONTSIZE") <> "" then
  117. Response.Cookies("HTMLA")("FONTSIZE")=Request.QueryString("FONTSIZE")
  118. Response.Cookies("HTMLA").expires=#December 31, 2000 1:00:00 AM#
  119. Session("FONTSIZE")=Request.QueryString("FONTSIZE")
  120. Session.timeout=200
  121. else
  122. Session("FONTSIZE") = Request.Cookies("HTMLA")("FONTSIZE")
  123. end if
  124. %>
  125. <html>
  126. <% if Session("IsIE") then %>
  127. <script language="JavaScript">
  128. // Determine the version number.
  129. var version;
  130. version=1
  131. var requiredVersion=2;
  132. if (typeof(ScriptEngineMajorVersion) + ""=="undefined")
  133. {
  134. version=1;
  135. }
  136. else
  137. {
  138. version=ScriptEngineMajorVersion();
  139. }
  140. // Prompt client and navigate to download page.
  141. if (version < requiredVersion)
  142. {
  143. if (confirm("<%= L_LIVESCRIPT_TEXT %>"))
  144. {
  145. self.location.href="http://www.microsoft.com/msdownload/scripting.htm";
  146. }
  147. }
  148. </script>
  149. <% end if %>
  150. <head>
  151. <title><%= L_TITLE_TEXT %></title>
  152. </head>
  153. <script LANGUAGE="JavaScript">
  154. <% if Session("IsIE") then %>
  155. if (version >= requiredVersion)
  156. {
  157. <% end if %>
  158. if (newBrowser()){
  159. var curURL = self.location.href;
  160. curURL = curURL.toUpperCase();
  161. if (curURL.substring(0,4) != "HTTPS")
  162. {
  163. alert("<%= L_NOSSL_TEXT %>");
  164. }
  165. self.location.href = "iisnew.asp";
  166. }
  167. else
  168. {
  169. self.location.href = "iis.asp";
  170. }
  171. <% if Session("IsIE") then %>
  172. }
  173. <% end if %>
  174. function newBrowser(){
  175. //Checks for existence of cookie
  176. cookiestr="<%= Session("FONTSIZE") %>"
  177. brwser="<%= Session("BROWSER") %>"
  178. return (cookiestr == "");
  179. }
  180. </script>
  181. <body BGCOLOR="silver">
  182. </body>
  183. <% else %>
  184. <html>
  185. <body background="silver" text="#000000" LEFTMARGIN = 0 TOPMARGIN=0>
  186. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  187. <tr bgcolor="Teal">
  188. <td>
  189. <IMG SRC="images/Ismhd.gif" WIDTH=189 HEIGHT=19 BORDER=0>
  190. </td>
  191. <td align="right" valign="middle">
  192. <%= sFont("","","#FFFFFF",True) %>
  193. </FONT>
  194. </td>
  195. </tr>
  196. </table>
  197. <table cellpadding="0" height="100%" width="100%" cellpadding="0" cellspacing="0" border="0">
  198. <tr>
  199. <td VALIGN="top" bgcolor=white>
  200. <IMG SRC="images/Ism.gif" WIDTH=189 HEIGHT=55 BORDER=0>
  201. </td>
  202. <td width=10 bgcolor="Silver">
  203. &nbsp;
  204. </td>
  205. <td width="100%" bgcolor="Silver" VALIGN="top">
  206. <%= sFont("","","",True) %>
  207. &nbsp;
  208. <br>
  209. <%= L_BROWSERUNTESTED_TEXT %><p>
  210. <p>
  211. <%= L_MAYCONTINUE_TEXT %>
  212. <p>
  213. <a href="http://www.microsoft.com/ie/default.asp"><%= L_BESTVIEWING_TEXT %></a>
  214. <p>
  215. <a href="default.asp?browserok=True">
  216. <%= L_CONTINUE_TEXT %>
  217. </a>
  218. <hr>
  219. <b><%= L_MINREQS_TEXT %></b>
  220. <p>
  221. <b><%= L_WINDOWS_TEXT %></b><br>
  222. <%= L_IE302_TEXT %><br>
  223. <%= L_NS30_TEXT %><br>
  224. <p>
  225. <b><%= L_MAC_TEXT %></b><br>
  226. <%= L_IE400_TEXT %><br>
  227. <%= L_NS403_TEXT %><br>
  228. <p>
  229. <b><%= L_UNIXOS_TEXT %></b><br>
  230. <%= L_IE400_TEXT %><br>
  231. <%= L_NS403_TEXT %><br>
  232. </font>
  233. </td>
  234. </tr>
  235. </table>
  236. <FONT COLOR="#FFFFFF">
  237. <%= Session("Browser") %>
  238. <%= Session("browserver") %>
  239. <%= Session("BrowserHScalePct") %>
  240. </FONT>
  241. </body>
  242. <% end if %>
  243. </html>