home *** CD-ROM | disk | FTP | other *** search
Wrap
<%@ LANGUAGE=VBScript %> <%Option Explicit %> <% ' strings for localization Const L_ACCESSDENIED_TEXT="Unauthorized - Logon failed" Const L_ISM_TEXT="Microsoft Internet Service Manager" Const L_JSCRIPTVER_TEXT="IIS Web administration requires JScript version 3.0 or greater. You can download the lastest javascript files from http://www.microsoft.com/jscript" On Error Resume Next Dim currentobj Dim adminserver, lasterr, cont, logonfailure, thisinst ' check for our session vars... if they are missing we need to regrab from the cookies... %> <% if Session("Browser") = "" or Session("FONTSIZE") = "" then %> <% Response.write ("<META HTTP-EQUIV='Refresh' CONTENT='0;URL=default.asp'>") %> <% else %> <% Set currentobj=GetObject("IIS://localhost/w3svc") adminserver = currentobj.AdminServer lasterr = err if err = -2147463162 then Response.Status = "401 access denied" cont = False logonfailure = True else if err=0 then cont=True else cont=False logonfailure = False end if end if %> <% if cont then %> <% if (Request.ServerVariables("INSTANCE_ID")=currentobj.AdminServer) then Session("isAdmin")=true else Session("isAdmin")=false end if %> <HTML> <HEAD> <TITLE><%= L_ISM_TEXT %></TITLE> </HEAD> <% if Session("Browser") = "IE3" then %> <FRAMESET ROWS="35,*,0" FRAMEBORDER=0 FRAMESPACING=1> <FRAME SRC="iihd.asp" NAME="head" SCROLLING="no"> <FRAME SRC="blank.htm" NAME="body"> <FRAME SRC="blank.htm" NAME="connect" FRAMEBORDER=0 FRAMESPACING=1 SCROLLING="auto"> </FRAMESET> <% else %> <FRAMESET ROWS="35,*,0" FRAMEBORDER="no" BORDER=0 FRAMESPACING=0> <FRAME SRC="iihd.asp" NAME="head" SCROLLING="no" MARGINHEIGHT=0 MARGINWIDTH=0> <FRAME SRC="blank.htm" NAME="body"> <FRAME SRC="blank.htm" NAME="connect" FRAMEBORDER=0 FRAMESPACING=0 SCROLLING="no"> </FRAMESET> <% end if %> </HTML> <% else %> <% if not logonfailure then %> <HTML> <BODY> Unable to connect to the Active Directory Service Object. Please contact your system adminstrator.<P> Error: <B><%= err %> <%= err.description %></B> </BODY> </HTML> <% end if %> <% end if %> <% end if %>