okay, i didn't create the file, I thought it was with Au4?
anyway, create file inc_activeusers_data.asp as<%
'#################################################################################
'## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details.
'##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
bolOverride = chkAUPermissions(strAUAnonOverride)
bolPanel = chkAUPermissions(strAUPAllow)
bolAUPage = chkAUPermissions(strAUAllow)
'## Ls3k - Before we can do anything we need to get rid of those slackers who have left ;)
deleteInactiveUsers()
'## Ls3k - Lest first deal with members logged in - for them we need to join with the members table.
intTotalActiveUsers = 0
intActiveMembers = 0
intActiveAnonMembers = 0
intActiveGuests = 0
strSql = "SELECT ME.MEMBER_ID, ME.M_NAME, ME.M_AUHIDE, ME.M_LEVEL " & _
"FROM " & strTablePrefix & "ACTIVE_USERS AU, " & strMemberTablePrefix & "MEMBERS ME " & _
"WHERE AU.MEMBER_ID = ME.MEMBER_ID ORDER BY ME.M_NAME"
set rsAM = my_conn.execute (strSql)
if rsAM.EOF or rsAM.BOF then
rsAM.close
set rsAM = nothing
else
do until rsAM.EOF
intTotalActiveUsers = intTotalActiveUsers + 1
if (rsAM("M_AUHIDE")="1" or isNull(rsAM("M_AUHIDE"))) or strAUAnon = 0 or bolOverride then
intActiveMembers = intActiveMembers + 1
if strActiveMemberList <> "" then
strActiveMemberList = strActiveMemberList & " | " & VBNewLine
end if
if strUseExtendedProfile then
strActiveMemberList = strActiveMemberList & "<a href=""pop_profile.asp?mode=display&id="& rsAM("MEMBER_ID") & """>"
else
strActiveMemberList = strActiveMemberList & "<a href=""JavaScript:openWindow2('pop_profile.asp?mode=display&id=" & rsAM("MEMBER_ID") & "')"">"
end if
strActiveMemberList = strActiveMemberList & "<font color=""" & strDefaultFontColor & """>"
if rsAM("M_LEVEL") = 2 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUModColor & """>"
elseif rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "<font color=""" & strAUAdminColor & """>"
end if
strActiveMemberList = strActiveMemberList & rsAM("M_NAME")
if rsAM("M_LEVEL") = 2 or rsAM("M_LEVEL") = 3 then
strActiveMemberList = strActiveMemberList & "</font>"
end if
strActiveMemberList = strActiveMemberList & "</font>"
strActiveMemberList = strActiveMemberList & "</a>"
else
intActiveAnonMembers = intActiveAnonMembers + 1
end if
rsAM.movenext
loop
rsAM.close
set rsAM = nothing
end if
'## Ls3k - Now lets count those peskey guests.
strSql = "SELECT COUNT(AU_IP) AS CNT FROM " & strTablePrefix & "ACTIVE_USERS WHERE MEMBER_ID = -1"
set rs = my_conn.execute (strSql)
intActiveGuests = rs("CNT")
rs.close
set rs = nothing
intTotalActiveUsers = intTotalActiveUsers + intActiveGuests
'## Ls3k - Ok, now it is time to check the record, cause it would be cool if we broke it!
chkAURecord(intTotalActiveUsers)
%>