%@ CodePage=65001 Language="VBScript"%>
<%
Dim strTempLocation, iLocation, intloc
GetConfigVariables
SetupDatabase
bIsAdmin = IsAdmin(sUsername, sPassword)
if (bBBSRegistrationRequired = 1 or bBBSAuthorizationRequired = 1) and (sLogonType <> "ok") then
response.redirect "../logon.asp?error=needregistration"
end if
dim SQL, sWebsite, sListUsername, sICQ, itotalposts, dDateRegistered
dim sLocation, sICQLink, sBBSLocation, dlastactivity
if (bIsAdmin) or (isModerator(sUsername, sPassword, -1) and bModeratorsCanSeeInvisible = 1) then
bHonorInvisible = 0
else
bHonorInvisible = 1
end if
%>
<%=validateField(sBBSName)%> : Who's Online?
<% if bDisplayBBSQuotes = 1 then%>
<%=sBBSRandomQuoteText%> <%=GetRandomQuote%>
<% else %> <% end if %>
">Who's online right now : <%=validateField(sBBSName)%>
Username
<% if bBBSHideIP = 0 or (bIsAdmin) then %>
IP
<% end if %>
Logon Time
Last Activity
<% if sBBSDisplayPath <> "none" then %>
Action
<% end if %>
<% if bGlobaldisablepostcount <> 1 then %>
Total posts
<% end if %>
<%
SQL = "select [online].*, [members].[location], [members].[disablepostcount], [members].[totalposts], " & _
"[members].[dateregistered], [members].[website], [members].[invisible] from [online] LEFT OUTER JOIN [members] on " & _
"[online].[username] = [members].[username] order by [online].[lastactivity] DESC;"
rsMaster.open SQL, dbConnection, adOpenForwardOnly, adLockReadOnly
do until rsMaster.EOF
sWebsite = rsMaster("website").value
sListUsername = rsMaster("username").value
sIP = rsMaster("ip").value
itotalposts = rsMaster("totalposts").value
dDateRegistered = rsMaster("dateregistered").value
sLocation = rsMaster("location").value
sBBSLocation = rsMaster("bbslocation").value
dlastactivity = rsMaster("lastactivity").value
dlogontime = rsMaster("logontime").value
iInvisible = ValidateBoolean(rsMaster("invisible").value)
bdisablepostcount = rsMaster("disablepostcount").value
bIsRegistered = rsMaster("registered").value
if sBBSDisplayPath ="partial" then
' "partial" code contributed by jarrek
iLocation = instrrev(sBBSLocation, "/")-1
if iLocation <= 0 then iLocation = 1
strTempLocation = Right(sBBSLocation, len(sBBSLocation)-instrrev(sBBSLocation, "/", iLocation))
strTempLocation = Left(strTempLocation, instrrev(strTempLocation, ".asp")-1)
strTempLocation = Replace(strTempLocation,"-"," ")
strTempLocation = Replace(strTempLocation,"/",": ")
'Give the Location some sense of Style (Title-Case)
strTempLocation = UCase(Left(strTempLocation, 1)) & Right(strTempLocation, Len(strTempLocation) - 1)
intLoc = InStr(1, strTempLocation, " ") + 1
Do Until intLoc = 1
strTempLocation = Left(strTempLocation, intLoc - 1) & UCase(Right(Left(strTempLocation, intLoc), 1)) & Right(strTempLocation, Len(strTempLocation) - intLoc)
intLoc = InStr(intLoc + 1, strTempLocation, " ") + 1
Loop
sBBSLocation = strTempLocation
elseif sBBSDisplayPath = "summary" then
if instr(sBBSLocation, sForumRoot & "/admin") > 0 then
sBBSLocation = "Administrative pages"
elseif instr(sBBSLocation, sForumRoot & "/calendar") > 0 then
sBBSLocation = "Calendars"
elseif instr(sBBSLocation, sForumRoot & "/photos") > 0 then
sBBSLocation = "Photo Albums"
elseif instr(sBBSLocation, sForumRoot & "/pollbooth") > 0 then
sBBSLocation = "Creating a poll"
elseif instr(sBBSLocation, sForumRoot & "/profile-upload") > 0 then
sBBSLocation = "Managing photos"
elseif instr(sBBSLocation, sForumRoot & "/random-quotes") > 0 then
sBBSLocation = "Random Quotes"
elseif instr(sBBSLocation, sForumRoot & "/schemes") > 0 then
sBBSLocation = "Color Schemes"
elseif instr(sBBSLocation, sForumRoot & "/search") > 0 then
sBBSLocation = "Searching Forums"
elseif instr(sBBSLocation, sForumRoot & "/statistics/whos-online.asp") > 0 then
sBBSLocation = "Who's online"
elseif instr(sBBSLocation, sForumRoot & "/statistics/visitor-history.asp") > 0 then
sBBSLocation = "Visitor History"
elseif instr(sBBSLocation, sForumRoot & "/statistics/user-listing.asp") > 0 then
sBBSLocation = "User Listing"
elseif instr(sBBSLocation, sForumRoot & "/statistics/") > 0 then
sBBSLocation = "BBS Statistics"
elseif instr(sBBSLocation, sForumRoot & "/banned.asp") > 0 then
sBBSLocation = "BANNED!"
elseif instr(sBBSLocation, sForumRoot & "/category-view.asp") > 0 then
sBBSLocation = "Viewing Categories"
elseif instr(sBBSLocation, sForumRoot & "/controlpanel.asp") > 0 then
sBBSLocation = "Control Panel"
elseif instr(sBBSLocation, sForumRoot & "/edit-profile.asp") > 0 then
sBBSLocation = "Viewing/Editing profile"
elseif instr(sBBSLocation, sForumRoot & "/forget-password.asp") > 0 then
sBBSLocation = "Forgot Password"
elseif instr(sBBSLocation, sForumRoot & "/forum-view.asp.asp") > 0 then
sBBSLocation = "Viewing Forums"
elseif instr(sBBSLocation, sForumRoot & "/freeze-thread.asp") > 0 then
sBBSLocation = "Freeze Thread"
elseif instr(sBBSLocation, sForumRoot & "/logon.asp") > 0 then
sBBSLocation = "Logging on"
elseif instr(sBBSLocation, sForumRoot & "/logoff.asp") > 0 then
sBBSLocation = "Logging off"
elseif instr(sBBSLocation, sForumRoot & "/message-delete.asp") > 0 then
sBBSLocation = "Deleting a message"
elseif instr(sBBSLocation, sForumRoot & "/recent-threads.asp") > 0 then
sBBSLocation = "Recent Threads"
elseif instr(sBBSLocation, sForumRoot & "/register.asp") > 0 then
sBBSLocation = "Registering Account"
elseif instr(sBBSLocation, sForumRoot & "/send-private-message.asp") > 0 then
sBBSLocation = "Inbox"
elseif instr(sBBSLocation, sForumRoot & "/inbox.asp") > 0 then
sBBSLocation = "Inbox"
elseif instr(sBBSLocation, sForumRoot & "/sticky-thread.asp") > 0 then
sBBSLocation = "Creating a Sticky Thread"
elseif instr(sBBSLocation, sForumRoot & "/thread-delete.asp") > 0 then
sBBSLocation = "Deleting Threads"
elseif instr(sBBSLocation, sForumRoot & "/thread-move.asp") > 0 then
sBBSLocation = "Moving Threads"
elseif instr(sBBSLocation, sForumRoot & "/thread-post.asp") > 0 then
sBBSLocation = "Posting a message"
elseif instr(sBBSLocation, sForumRoot & "/thread-view.asp") > 0 then
sBBSLocation = "Viewing Messages"
elseif instr(sBBSLocation, sForumRoot & "/") > 0 then
sBBSLocation = "Browsing the forum"
else
sBBSLocation = "Browsing the site"
end if
end if
if (iInvisible = 1 and bHonorInvisible = 0) or (iInvisible = 0) or not( UserExists( sListUsername ) ) then
%>
<% if len(sWebsite) > 4 then
response.write ""
end if
%>
<% if bIsRegistered = 1 then
response.write CreateUsernameLink (sListUsername) & validateField(sListUsername) & ""
else
response.write sListUsername
end if
%>