<% Response.ContentType = "text/xml" Response.Write "" & vbNewLine Response.Write vbTab & "" & vbNewLine Response.Write vbTab & vbTab & "" & strForumName & "" & vbNewLine Response.Write vbTab & vbTab & "" & strForumAddress & "" & vbNewLine Response.Write vbTab & vbTab & ""& strForumName & " RSS" & vbNewLine 'The actuall generation of the RSS feed Dim strSQL, arrRSS, strTitle, intPosts, arrPermission, arrAdmin, user, pass, blnLogin, lang, i, LanguageParser strSQL = "SELECT tforumid, ttitle, tid FROM aspbb_topics WHERE tshow=1 ORDER BY tdatelast DESC" objDAL.Open arrRSS, strSQL, Empty intPosts = 0 user = Request("user") pass = Request("pass") if user = "" then user = 0 if pass = "" then pass = 0 blnLogin = false for i = 0 to Ubound(arrRSS, 2) 'Check if user is who he intends to be if not blnLogin then strSQL = "SELECT COUNT(*) as intResult FROM aspbb_members WHERE mid= {0} AND mpass={1}" objDAL.Open arrPermission, strSQL, Array(user, pass) if not EOF(arrPermission) then blnLogin = True end if end if If blnLogin OR user = 0 then '//Check if this user can access this part strSQL = "SELECT aspbb_subcategory.suid,aspbb_category.cid FROM aspbb_category INNER JOIN aspbb_subcategory ON aspbb_subcategory.suid=aspbb_category.cid WHERE aspbb_subcategory.sid= {0}" objDAL.Open arrAdmin, strSQL, Array(arrRSS(0, i)) '//Check users permission if AccessCat(user, arrAdmin(1, 0)) then response.write "" & Server.HTMLEncode(arrRSS(1, i)) & "" & strForumAddress & "topic.asp?TID=" & arrRSS(2, i) &"" & vbNewLine intPosts = intPosts +1 End if End if if intPosts = 10 then exit for next 'Fetch info on new reports dim intNewReports If isadmin(user) or isModerator(user) <> "" then strSQL = "Select Count(*) from aspbb_report where rdone = 0" If isModerator(user) <> "" and (isadmin(user) = False) then strSQL = strSQL & " and rforumid in ({0})" End if intNewReports = objDAL.GetValue(strSQL, Array(isModerator(user))) Else intNewReports = "" End if 'Display new PMs in inbox and if moderator/admin show reports if user <> 0 and blnLogin then 'Set language lang = objDAL.GetValue("SELECT mlanguage FROM aspbb_members WHERE mid= {0}", Array(user)) Set LanguageParser = new langParser LanguageParser.Language = lang LanguageParser.Start LanguageParser.IncludeSection "rss" response.write "" & langmessages & ": " & countPM(user) & "" & strForumAddress & "inbox.asp" & vbNewLine if intNewReports <> "" then response.write "" & langnewreports & ": " & intNewReports & "" & strForumAddress & "admin.asp?admin=reported" & vbNewLine end if end if Response.Write vbTab & "" & vbNewLine Response.Write "" & vbNewLine objDAL.Disconnect %>