%@ CodePage=65001 Language="VBScript"%>
<% GetConfigVariables
SetupDatabase
dim rsForums, sResult
set rsForums = server.createObject("ADODB.Recordset")
checkUsername sUsername, sPassword, sResult
if (bBBSRegistrationRequired = 1 or bBBSAuthorizationRequired = 1) and (sResult <> "ok") then
response.redirect sValidatedBaseURL & "/logon.asp?error=needregistration"
end if
%>
<%=validateField(sBBSName)%> : Category / Forum listings
<% if bDisplayBBSQuotes = 1 then%>
Random quote : <%=ValidateField(GetRandomQuote)%>
<% end if %>
Category Name
<%
SQL = "select [CategoryID], [Name], [URL] from [Categories] order by [CategoryID], [Name]"
rsMaster.open SQL, dbConnection, adOpenStatic, adLockReadOnly
do until rsMaster.EOF
%>
">
<%=validateField(rsMaster("Name"))%>
Forum Name
Threads
Messages
Last Post
Moderators
<%
bIsAdmin = isAdmin(sUsername, sPassword)
SQL = "select [ForumID], [LastPoster], [LastActivity], [ForumName], [ForumDescription], [Restricted], [URL], [registration],[invisible] " & _
"from [Forums] where [CategoryID]=" & rsMaster("CategoryID") & ";"
rsForums.open SQL, dbConnection, adOpenForwardOnly, adLockReadOnly
do until rsForums.EOF
if rsForums("Invisible") = 0 or ( bIsAdmin or _
isModerator(sUsername, sPassword, rsForums("ForumID")) or _
InRestrictedList(sUsername, sPassword, rsForums("ForumID")) _
) then
%>
"><%=validateField(rsForums("ForumName"))%>
<% if rsForums("restricted") = 1 then%>
<% else %>
<% end if %>
<% if rsForums("invisible") = 1 then%>
<% end if %>
<%=rsForums("ForumDescription")%>
<%=GetForumThreadCount(rsForums("ForumID"))%>
<%=GetForumPostCount(rsForums("ForumID"))%>
<%=GetShortDateTime(rsForums("LastActivity"))%> by <%=ValidateField(rsForums("LastPoster"))%>
<%=ListModerators(rsForums("ForumID"))%>
<%
end if
rsForums.MoveNext
loop
rsForums.Close
rsMaster.MoveNext
Loop
rsMaster.Close
%>