Object is closed. /display.asp, line 14
Please help
<%
'Response.Expires = 0
'Response.AddHeader "pragma", "no-cache"
Response.Buffer = True
Session.Timeout = 120
Dim strPageName
If Left(Request.ServerVariables("CONTENT_TYPE"), 9) = "multipart" Then
Dim objUpload
Set objUpload = Server.CreateObject("ADODB.Connection")
objUpload.SaveToMemory()
strPageName = objUpload.Form("hdnPage")
Set Session("ASPUpload") = objUpload
Session("Mode") = 1
Else
strPageName = Request.QueryString("page")
Session("Mode") = 0
End If
If Trim(strPageName) = "" Then
strPageName = "HOME"
End If
Dim objSettings
objSettings = GetSettings (Server.MapPath ("config/site.xml"), strPageName)
If IsEmpty(objSettings) Then
Response.Redirect "hp.asp?page=HOME"
Response.End
End If
Dim strXmlPath
Dim strXslPath
Dim strAspPath
Dim strRestrictedTo
Dim oPage
strXmlPath = objSettings(0)
strXslPath = objSettings(1)
strAspPath = objSettings(2)
strRestrictedTo = objSettings(3)
Session("Connection") = objSettings(4)
Select Case strRestrictedTo
Case "ADMIN", "*"
If CInt(Session("UserID")) < 1 Then
Session("RedirectUrl") = Request.QueryString
Response.Redirect "hp.asp?page=LOGIN"
Response.End
End If
If (strRestrictedTo = "ADMIN") And (Session("IsAdmin") <> 1) Then
Response.Redirect "hp.asp?page=HOME"
Response.End
End If
End Select
Set oPage = LoadPage(strXmlPath)
If Session("IsAdmin") = 1 Then
oPage.DocumentElement.SetAttribute "is-admin","1"
End If
If CInt(Session("UserID")) < 1 Then
oPage.DocumentElement.SetAttribute "is-logged","0"
Else
oPage.DocumentElement.SetAttribute "is-logged","1"
End If
oPage.DocumentElement.SetAttribute "root", strRoot
oPage.DocumentElement.SetAttribute "httpsroot", strHTTPSRoot
If Left(Request.ServerVariables("HTTP_USER_AGENT"),11) = "Mozilla/4.7" Or Left(Request.ServerVariables("HTTP_USER_AGENT"),11) = "Mozilla/4.8" Then
oPage.DocumentElement.SetAttribute "netscape", "1"
Else
oPage.DocumentElement.SetAttribute "netscape", "0"
End If
StartSession
ApplyHeader(oPage)
ApplySideBar oPage, strPageName
ProcessMappings(oPage)
If strAspPath <> "" Then
Set Session("oPage") = oPage
Server.Execute strAspPath
Set Session("oPage") = Nothing
End If
%>
Please help
<%
'Response.Expires = 0
'Response.AddHeader "pragma", "no-cache"
Response.Buffer = True
Session.Timeout = 120
Dim strPageName
If Left(Request.ServerVariables("CONTENT_TYPE"), 9) = "multipart" Then
Dim objUpload
Set objUpload = Server.CreateObject("ADODB.Connection")
objUpload.SaveToMemory()
strPageName = objUpload.Form("hdnPage")
Set Session("ASPUpload") = objUpload
Session("Mode") = 1
Else
strPageName = Request.QueryString("page")
Session("Mode") = 0
End If
If Trim(strPageName) = "" Then
strPageName = "HOME"
End If
Dim objSettings
objSettings = GetSettings (Server.MapPath ("config/site.xml"), strPageName)
If IsEmpty(objSettings) Then
Response.Redirect "hp.asp?page=HOME"
Response.End
End If
Dim strXmlPath
Dim strXslPath
Dim strAspPath
Dim strRestrictedTo
Dim oPage
strXmlPath = objSettings(0)
strXslPath = objSettings(1)
strAspPath = objSettings(2)
strRestrictedTo = objSettings(3)
Session("Connection") = objSettings(4)
Select Case strRestrictedTo
Case "ADMIN", "*"
If CInt(Session("UserID")) < 1 Then
Session("RedirectUrl") = Request.QueryString
Response.Redirect "hp.asp?page=LOGIN"
Response.End
End If
If (strRestrictedTo = "ADMIN") And (Session("IsAdmin") <> 1) Then
Response.Redirect "hp.asp?page=HOME"
Response.End
End If
End Select
Set oPage = LoadPage(strXmlPath)
If Session("IsAdmin") = 1 Then
oPage.DocumentElement.SetAttribute "is-admin","1"
End If
If CInt(Session("UserID")) < 1 Then
oPage.DocumentElement.SetAttribute "is-logged","0"
Else
oPage.DocumentElement.SetAttribute "is-logged","1"
End If
oPage.DocumentElement.SetAttribute "root", strRoot
oPage.DocumentElement.SetAttribute "httpsroot", strHTTPSRoot
If Left(Request.ServerVariables("HTTP_USER_AGENT"),11) = "Mozilla/4.7" Or Left(Request.ServerVariables("HTTP_USER_AGENT"),11) = "Mozilla/4.8" Then
oPage.DocumentElement.SetAttribute "netscape", "1"
Else
oPage.DocumentElement.SetAttribute "netscape", "0"
End If
StartSession
ApplyHeader(oPage)
ApplySideBar oPage, strPageName
ProcessMappings(oPage)
If strAspPath <> "" Then
Set Session("oPage") = oPage
Server.Execute strAspPath
Set Session("oPage") = Nothing
End If
%>