<%'Include Data Connection%> <%'Include ADO constants include file for VBScript%> <%'Include Utility Scripts%> <% Response.Buffer = True Response.Expires = -1 'open data connection Call OpenConn() 'if the admin user's session has timed out or ' if the user does not have page level access and is not an admin then... If (Session("UserId")="") Or (Not(UserHasPageLevelAccess(Session("UserId"), Request.ServerVariables("URL"))) And Not(UserIsAdmin(Session("UserId")))) Then 'close all child windows and redirect the user to the login page dim strRedirect 'if the user's session timed out then... If Session("UserId")="" Then 'set the strRedirect variable to the login page strRedirect = "/admin/login.asp" 'if the user does not have access to the current url and he is not a super admin then... Else 'set the strRedirect variable to the main menu strRedirect = "/admin/default.asp" End If %> <% End If 'close data connection Call CloseConn() %>