<% Response.Buffer = false ' Set to true after testing %> [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] <% If Application(strC & "sTimer") <> 0 then sTime = GetTime() End If 'Load XML set oXML = Server.CreateObject("MSXML2.DOMDocument.3.0") oXML.async = false oXML.validateOnParse = true sXML = "" if not blServerTrans then oXML.validateOnParse = false oXML.resolveExternals = false sXML = sXML & "]>" sXML = sXML & "" sXML = sXML & "&l;" Else sXML = sXML & "" End If oXML.loadxml sXML set rNode = oXML.documentElement if blServerTrans then ' Load Language set lXML = Server.CreateObject("MSXML2.DOMDocument.3.0") lxml.validateOnParse = true lXML.async = false lXML.load strApPath & "XSLT\Languages\lang_" & lang & "_def.xml" set lNode = lXML.documentElement rNode.appendChild lNode set lNode = nothing set lXML = nothing End If AddXMLNode oXML, rNode, "f_title", Application(strC & "TITLE"), false AddXMLNode oXML, rNode, "f_home_url", Application(strC & "HOMEURL"), false AddXMLNode oXML, rNode, "f_url", Application(strC & "FORUMURL"), false AddXMLNode oXML, rNode, "f_image", Application(strC & "IMAGE"), false set objData = new clsDB 'Open Database Connection if not objData.openDB then Response.Write objData.oError.description End If %> [an error occurred while processing this directive] [an error occurred while processing this directive] <% 'Get Totals if we need them if Application(strC & "sStats") <> 0 then objData.GetCounts objData.GetLastMember AddXMLNode oXML, rNode, "f_stats", "-1", false AddXMLNode oXML, rNode, "f_nmembers", objData.UserCount, false AddXMLNode oXML, rNode, "f_ntopics", objData.TopicCount, false AddXMLNode oXML, rNode, "f_nposts", objData.PostCount, false AddXMLNode oXML, rNode, "f_nforums", objData.ForumCount, false set oNode = AddXMLNode (oXML, rNode, "f_lmember", server.HTMLEncode(objData.LastUser), false) AddXMLAttrib oNode, "id", objData.LastUserID Else AddXMLNode oXML, rNode, "f_stats", "0", false End If AddXMLNode oXML, rNode, "f_ausers", Application(strC & "ShowActiveUsers"), false ' Private Messages If Application(strC & "PMESSAGES") <> 0 and objData.GetSessionVal("UID") <> "" then AddXMLNode oXML, rNode, "f_pmessages", "-1", false AddXMLNode oXML, rNode, "f_nmessages", objData.NewPMessageCount(objData.GetSessionVal("UID")), false Else AddXMLNode oXML, rNode, "f_pmessages", "0", false End If 'Get Categories if request.querystring("cat") = "" then iCatID = -1 ELse iCatID = clng(request.querystring("cat")) End If arCats = objData.GetCats(iCatID) if not isArray(arCats) then ' No cats Found Else if request.querystring("cat") <> "" then AddXMLNode oXML, rNode, "ptitle", arCats(1,0), false End IF for intCats = 0 to UBound(arCats,2) if (objData.GetSessionVal("LoggedOnGrp") AND arCats(3,intCats)) OR NOT arCats(4,intCats) then ' Can we see it set oNode = AddXMLNode(oXML, rNode, "f_cat", "", false) AddXMLAttrib oNode, "id", arCats(0,intCats) AddXMLAttrib oNode, "homepage", cbool(arCats(2,intCats)) AddXMLNode oXML, oNode, "c_name", arCats(1,intCats), false set oNode = AddXMLNode(oXML, oNode, "forums", "", false) ' Get Forums For this category arForums = objData.getForums(arCats(0,intCats)) if not IsArray(arForums) then ' no Forums Found Else for intForums = 0 to ubound(arForums,2) if (objData.GetSessionVal("LoggedOnGrp") AND arForums(7, intForums)) OR NOT arForums(14, intForums) then set nNode = AddXMLNode(oXML, oNode, "forum", "", false) if arForums(16, intForums) > 0 then ' Subforums set subForum = AddXMLNode(oXML, nNode, "subforum", "", false) arSubForums = objData.GetSubforums(arForums(0, intForums)) for intSForum = 0 to ubound(arSubForums,2) set sNode = AddXMLNode(oXML, subForum, "sforum", "", false) AddXMLAttrib sNode, "id", arSubForums(0, intSForum ) AddXMLAttrib sNode, "title", arSubForums(3, intSForum) next End If AddXMLAttrib nNode, "id", arForums(0, intForums) AddXMLAttrib nNode, "islink", cbool(arForums(10, intForums)) AddXMLAttrib nNode, "link", arForums(9, intForums) ' What folder do we show for the forum. isLocked = cbool(arForums(8, intForums)) LastPostDate = arForums(5, intForums) if datediff("n", objData.GetSessionVal("LoggedOnLDate"), LastPostDate) > 1 then ' New Posts folder = iif(isLocked, "lockednew", "new") Else folder = iif(isLocked, "locked", "old") End If AddXMLAttrib nNode, "folder", folder AddXMLNode oXML, nNode, "subject", arForums(1, intForums), false AddXMLNode oXML, nNode, "desc", arForums(2, intForums), true AddXMLNode oXML, nNode, "topics", arForums(3, intForums), false AddXMLNode oXML, nNode, "posts", arForums(4, intForums), false set nNode = AddXMLNode(oXML, nNode, "lpost", FormatDate(arForums(5, intForums), "L"), false) AddXMLAttrib nNode, "id", arForums(11, intForums) AddXMLAttrib nNode, "name", arForums(13, intForums) AddXMLAttrib nNode, "tid", arForums(6, intForums) AddXMLAttrib nNode, "topic", arForums(12, intForums) End If next End If End If next End If 'Is show users set auNode = AddXMLNode(oXML, rNode, "au", "0", false) set aXML = Server.CreateObject("MSXML2.DOMDocument.3.0") aXML.loadXML Application("objAUXML").xml auNode.appendChild aXML.documentElement If Application(strC & "sTimer") <> 0 then eTime = GetTime() t = eTime-sTime t= FormatMilliseconds(t) AddXMLNode oXML, rNode, "f_TTime", t, false AddXMLNode oXML, rNode, "numq", objData.numq, false End If if blServerTrans then Response.Write XMLXSLTTrans(oXML,"XSLT/" & xsltSkin & "/default.xsl") else Response.ContentType = "text/xml" Response.Write oXML.xml End If CloseDB sub CloseDB() objData.closeDB set oXML = nothing set objData = nothing End Sub %>