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.

105 lines
2.5 KiB

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4. <!--#include file="default.str"-->
  5. <!--#include file="iis.str"-->
  6. <!--#include file="iisetfnt.inc"-->
  7. <%
  8. On Error Resume Next
  9. %>
  10. <% if Request("Session") = "none" then%>
  11. <FONT FACE='<%= L_DEFTEXTFONT_TEXT %>' SIZE='<%= L_DEFFONTPOINT %>'>
  12. <%= L_TIMEOUT_TEXT %>
  13. <P>
  14. <%= L_REFRESH_TEXT %>
  15. </FONT>
  16. <% else %>
  17. <%
  18. Dim currentobj, infoobj
  19. Dim adminserver, lasterr, cont, logonfailure, thisinst, adminobj
  20. ' check for our session vars... if they are missing we need to regrab from the cookies...
  21. %>
  22. <% if Session("Browser") = "" or Session("FONTSIZE") = "" then %>
  23. <% Response.write ("<META HTTP-EQUIV='Refresh' CONTENT='0;URL=default.asp'>") %>
  24. <% else %>
  25. <%
  26. Dim adminpath
  27. dim debug
  28. debug = False
  29. adminpath = "IIS://localhost/w3svc/"+Request.ServerVariables("INSTANCE_ID")
  30. if debug then
  31. Response.write Request.ServerVariables("AUTH_USER") & "<BR>"
  32. Response.write Request.ServerVariables("AUTH_PASSWORD") & "<BR>"
  33. Response.write adminpath & "<BR>"
  34. end if
  35. Set currentobj=GetObject(adminpath)
  36. lasterr = err
  37. if err = &H800401E4 or err = 70 then
  38. Response.Status = "401 access denied"
  39. cont = False
  40. logonfailure = True
  41. else
  42. if err=0 then
  43. cont=True
  44. else
  45. cont=False
  46. logonfailure = False
  47. end if
  48. end if
  49. %>
  50. <% if cont then %>
  51. <%
  52. dim w3svc, site
  53. Set infoobj=GetObject("IIS://localhost/w3svc/info")
  54. if (Request.ServerVariables("INSTANCE_ID")=infoobj.AdminServer) then
  55. Set w3svc = GetObject("IIS://localhost/w3svc")
  56. if err = &H800401E4 or err = 70 then
  57. Session("isAdmin")=False
  58. else
  59. Session("isAdmin") = True
  60. end if
  61. else
  62. Session("isAdmin")=false
  63. end if
  64. if debug then
  65. Response.write err
  66. end if
  67. %>
  68. <HTML>
  69. <HEAD>
  70. <TITLE><%= L_ISM_TEXT %></TITLE>
  71. </HEAD>
  72. <FRAMESET ROWS="<%= iVScale(20) %>,*,<%= iVScale(0)%>" FRAMEBORDER="no" BORDER=0 FRAMESPACING=0>
  73. <FRAME SRC="iihd.asp" NAME="title" SCROLLING="no" MARGINHEIGHT=0 MARGINWIDTH=0 BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
  74. <FRAME SRC="blank.htm" NAME="body" MARGINHEIGHT=0 MARGINWIDTH=0 BORDER=0 FRAMEBORDER=0 FRAMESPACING=0>
  75. <FRAME SRC="blank.htm" NAME="connect" FRAMEBORDER=0 FRAMESPACING=0 SCROLLING="no">
  76. </FRAMESET>
  77. </HTML>
  78. <% else %>
  79. <% if not logonfailure then %>
  80. <HTML>
  81. <BODY>
  82. <%= L_NOADSI_TEXT %>
  83. <P>
  84. <%= L_ERROR_TEXT %><B><%= err %>&nbsp;<%= err.description %></B>
  85. </BODY>
  86. </HTML>
  87. <% end if %>
  88. <% end if %>
  89. <% end if %>
  90. <% end if %>