Author |
Topic |
|
Maxime
Average Member
France
521 Posts |
Posted - 11 May 2014 : 22:11:28
|
Hello carefree,
I tried inactive users, but it does not work. I get this error below. In the address bar there is this: http://www.chatquiz.org/scriptname
And then the error appears there: HTTP/1.1 404 Object not found |
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 May 2014 : 02:38:29
|
Just checked the file and it was corrupted, not sure exactly what happened there. I replaced it on SnitzBitz. Here, this works:
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. 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 an 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:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'###############################################################################
'## Inactive Users version 2.00 for Snitz 3.4.07
'## Originally written for version 3.3 by Sean Gorman (MotoX)
'##
'## Version 1.0 was a collaboration effort between Wesley Brown and Sean Gorman
'##
'## Version 2.1 by Carefree added mass-deletion of inactive users
'## Version 2.2 by Carefree added lock/unlock and mass-lock of inactive users
'###############################################################################
Response.Buffer = true
on error resume next
Server.ScriptTimeout = "1200"
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE file="inc_header.asp" -->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " Admin Section<br />" & vbNewLine & _
" " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " Inactive User List<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
Response.Flush
if Request.QueryString("intDaysOut")<>"" then
if not isNumeric(Request.QueryString("intDaysOut")) then
Response.Write "Number of days must be numeric!" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""3; URL=admin_inactive_users.asp"">"& vbNewLine
Response.End
else
intDaysOut = cInt(Request.QueryString("intDaysOut"))
end if
end if
if Request.QueryString("submit")="Email" then
intEmailAll=1
else
intEmailAll=0
end if
if intDaysOut = 0 then
intDaysOut = 90
end if
strYear = year(now() - IntDaysOut)
strMonth = month(now() - IntDaysOut)
strMonth = dFormat(strMonth)
strDay = day(now()-intDaysOut)
strDay = dFormat(strDay)
strHour = FormatDateTime(now(),4)
strHour = left(strHour,2)
strMinute = minute(now())
strMinute = dFormat(strMinute)
strSecond = second(now())
strSecond = dFormat(strSecond)
nDate = strYear&strMonth&strDay&strHour&strMinute&strSecond
on error resume next
strSql = "SELECT " &strMemberTablePrefix & "MEMBERS.M_NAME, " &strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " &strMemberTablePrefix & "MEMBERS.M_POSTS, " &strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &strMemberTablePrefix & "MEMBERS.M_EMAIL, " &strMemberTablePrefix & "MEMBERS.M_STATUS"
strSql = strSql & " FROM " &strMemberTablePrefix & "MEMBERS Where "&strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE < '"&ndate&"'"
strSql = strSql & " ORDER BY " &strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE "
Set oRs = Server.Createobject("ADODB.Recordset")
oRs.open strSql, My_Conn
if oRs.EOF then
' Do nothing
else
oRsName=oRs("M_NAME")
aData = oRs.GetRows
oRs.close
end if
set oRs = nothing
if oRsName<>"" then
aDataerr = 0
end if
intRQS=0
for i = 1 to len(Request.QueryString("submit"))
intRQS=intRQS+asc(mid(Request.QueryString("submit"),i,1))
next
if intRQS = 393 then
intLastRecord = ubound(aData,2)+1
for i = 0 to intLastRecord-1
Response.Write "Locking Member ID: " & aData(3,i) & "<br>"
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_STATUS = 0 WHERE MEMBER_ID = " & aData(3,i)
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
next
Call Sleeper(2)
Response.End
end if
if intRQS = 595 then
intLastRecord = ubound(aData,2)+1
for i = 0 to intLastRecord-1
delAr = aData(3,i)
Call DelAll
next
Call Sleeper(2)
Response.End
end if
if intEmailAll = 1 then
strMsg = "This message was sent from " & strForumTitle & _
". This is a warning to inform you that your account may be deleted"& _
" from our system due to inactivity. Should you wish to keep your account"& _
" active, all you need to do is visit our site at: " & strForumURL & _
" If you would like your account to be removed from our system, no action"& _
" is necessary. Thank You. " & strForumTitle
intLastRecord = ubound(aData,2)
intLastRecord = intLastRecord + 1
for i = 0 to intLastRecord - 1
trRecipientsName = aData(0,i)
strRecipients = aData(4,i)
strFrom = STRSENDER
strFromName = "Administrator"
strSubject = "Sent From " & strForumTitle & " by Board Administrator"
strMessage = "Hello " & trim(aData(0,i)) & vbNewline & vbNewline
strMessage = strMessage & "You received the following message from : Administrator (" & STRSENDER & ") " & vbNewline & vbNewline
strMessage = strMessage & "At: " & strForumURL & vbNewline & vbNewline
strMessage = strMessage & strMsg & vbNewline & vbNewline
if Request.QueryString("submit")="Email" then
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
next
if Request.QueryString("submit") = "Email" then
Response.Write " <p align=""center""><font face="""& strDefaultFontFace &""" size="""& strHeaderFontSize &""">All Users Have Been E-Mailed!</font></p>"& vbNewLine
else
Response.Write " <p align=""center""><font face="""& strDefaultFontFace &""" size="""& strHeaderFontSize &""">All Users Have Been Deleted!</font></p>"& vbNewLine
end if
Response.Write " <meta http-equiv=""Refresh"" content=""7; URL=admin_home.asp"">"& vbNewLine & _
" <p align=""center""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><a href=""admin_home.asp"">Back To Admin Home</font></a></p>"& vbNewLine
else
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" function ChangePage(fnum){" & vbNewLine & _
" if (fnum == 1) {" & vbNewLine & _
" document.PageNum1.submit();" & vbNewLine & _
" }" & vbNewLine & _
" else {" & vbNewLine & _
" document.PageNum2.submit();" & vbNewLine & _
" }" & vbNewLine & _
" }" & vbNewLine & _
" </script>" & vbNewLine
mypage = request("page")
if ((Trim(mypage) = "") or (IsNumeric(mypage) = False)) then mypage = 1
mypage = cLng(mypage)
if Request.QueryString("page") <> "" then
intPage = cint(Request.QueryString("page"))
else
intPage = 1
end if
intRecordsPerPage = 10 '10 Records per page
intFirstRecord = (intPage - 1) * intRecordsPerPage
ref = "<div align = ""Center"">"
if intPage > 1 then
ref = ref & "<font face="""& strDefaultFontFace &""" size="""& strFooterFontSize &"""><a href=admin_inactive_users.asp?"
ref = ref &"page=" & intPage - 1
ref = ref &"&intDaysOut="&intDaysOut
ref = ref &">"&getCurrentIcon(strIconGoLeft,"","align=""absmiddle""")&"Previous</a></font> "
end if
if oRsName<>"" then
if intFirstRecord + (intRecordsPerPage - 1) >= ubound(aData,2) then 'We're on the last page
intLastRecord = ubound(aData, 2)
else 'There's more pages - show a next link
intLastRecord = intFirstRecord + (intRecordsPerPage - 1)
ref = ref &" <font face="""& strDefaultFontFace &""" size="""& strFooterFontSize &"""><a href=admin_inactive_users.asp?"
ref = ref &"page=" & intPage + 1
ref = ref &"&intDaysOut="&intDaysOut
ref = ref &">"&getCurrentIcon(strIconGoRight,"","align=""absmiddle""")&"Next</a></font>"
ref = pref & ref
end if
end if
ref = ref &"</div>"
if oRsName<>"" then
if (ubound(aData, 2) / intRecordsPerPage) > cint((ubound(aData, 2) / intRecordsPerPage)) then
maxpages = cint((ubound(aData, 2) / intRecordsPerPage))
maxpages = maxpages + 1
else
maxpages = cint((ubound(aData, 2) / intRecordsPerPage))
end if
end if
Response.Write "<p><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><b>NOTE:</b> The following users have not visited "& STRFORUMTITLE &" in "& intDaysOut &" days or greater.</font></p>" & vbNewLine
if maxpages > 1 then
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""50%"" valign=""bottom""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &""">"
Call DropDownPaging(1)
Response.Write " </font></b></td>" & vbNewLine & _
" <td width=""50%"" align=""right""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &""">" & vbNewLine & _
ref & vbNewLine &_
" </font></b><BR></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
end if
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Username</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Profile</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Last Seen On Forum Date</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Total Posts</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Days Since Last Seen</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Warn Member</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Delete/Lock Member</font></b></td>" & vbNewLine & _
" </tr>" & vbNewLine
if aDataerr = 1 then
Response.Write " <tr>"& VbnewLine &_
" <td bgcolor="""& strForumCellColor &""" colspan=""7""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><b>No Members Found</b></font></td>" & vbNewLine &_
" </tr>"& VbnewLine
else
if oRsName<>"" then
reccnt = intLastRecord + 1
i = intFirstRecord
do while not(i = reccnt)
strMember = aData(0,i)
strRSLastHere = aData(1,i)
strRSRightNow = strForumTimeAdjust
strLastHere = StrToDate(strRSLastHere)
strRightNow = StrToDate(strRSRightNow)
strOnlineTDays = DateDiff("d",strLastHere,strRightNow)
Response.Write " <tr bgcolor="""& CColor &""">" & vbNewLine & _
" <td bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">" & aData(0,i) &"</font></td>" & vbNewLine & _
" <td align=""center"" bgcolor="""& strForumCellColor &""">" & vbNewLine
if strUseExtendedProfile then
Response.Write " <a href=""pop_profile.asp?mode=display&id="& aData(3,i) &""">" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id="& aData(3,i) &"')" & vbNewLine
end if
Response.Write " "&getCurrentIcon(strIconProfile,"","align=""absmiddle""") & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">"& StrToDate(aData(1,i)) &"</font></td>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">"& aData(2,i) &"</font></td>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">"& strOnlineTDays &"</font></td>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><a href=""JavaScript:openWindow('pop_warn_mail.asp?id="& aData(3,i) &"')"">" & vbNewLine & _
" "&getCurrentIcon(strIconEmail,"","align=""absmiddle""")&"</a>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><a href=""JavaScript:openWindow('pop_delete.asp?mode=Member&MEMBER_ID="& aData(3,i) &"')"">"&getCurrentIcon(strIconTrashCan,"","align=""absmiddle""")&"</a>" & vbNewLine
if aData(5,i) = "1" then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Member&MEMBER_ID=" & aData(3,i) & "')"">" & getCurrentIcon(strIconLock,"Lock Member","hspace=""0""") & "</a></font></td>" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Member&MEMBER_ID=" & aData(3,i) & "')"">" & getCurrentIcon(strIconUnlock,"Unlock Member","hspace=""0""") & "</a></font></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
i = i + 1
loop
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><BR>" & vbNewLine & _
" <font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><form action=""admin_inactive_users.asp"" method=""get"">" & vbNewLine & _
" Enter Number of Days inactivity you would like to check for: <input type=""text"" name=""intDaysOut"" value="""&intDaysOut&""" size=""3"" maxlength=""5"">" & vbNewLine & _
" <input type=""submit"" value=""Submit"">" & vbNewLine & _
" </font></form>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
end if
if aDataerr = 0 then
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><BR>" & vbNewLine & _
" <b> WARNING! </b> This could take up to 20 minutes to e-mail large groups!" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><BR>" & vbNewLine & _
" <font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><form action=""admin_inactive_users.asp"" method=""get"">" & vbNewLine & _
" <input type=""hidden"" name=""intDaysOut"" value="""&intDaysOut&""">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Delete"">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Email"">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Lock"">" & vbNewLine & _
" </font></form>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
end if
if strSiteIntegEnabled = "1" then
Response.Write "<table><tr valign=""top""><td valign=""top"">"
end if
WriteFooter
End if
function dFormat(tmp)
lenStr = len(tmp)
if lenStr = 1 then
tmp = "0"&tmp
dFormat = tmp
else
dFormat = tmp
end if
end function
sub DropDownPaging(fnum)
if maxpages > 1 then
if mypage = "" then
pge = 1
else
pge = mypage
end if
scriptname = request.servervariables("script_name")
Response.Write("<form name=""PageNum" & fnum & """ action=""admin_inactive_users.asp"">" & vbNewLine)
Response.Write("<b>Page: </b><select name=""page"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
for counter = 1 to maxpages
if counter <> cLng(pge) then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
end if
next
Response.Write("</select><b> of " & maxpages & "</b>" & vbNewLine)
Response.Write("</font>" & vbNewLine)
Response.Write("<input type=""hidden"" name=""intDaysOut"" value=""" & intDaysOut & """>" & vbNewLine)
Response.Write("</form>" & vbNewLine)
end if
top = "0"
end sub
Sub DelAll
if mLev > 3 then
Response.Write "Deleting Member ID: " & delAr & "<br>"
strSql = "DELETE FROM " & strTablePrefix & "MODERATOR"
strSql = strSql & " WHERE MEMBER_ID = " & delAr
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
strSql = "DELETE FROM " & strTablePrefix & "SUBSCRIPTIONS"
strSql = strSql & " WHERE MEMBER_ID = " & delAr
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
strSql = "DELETE FROM " & strTablePrefix & "ALLOWED_MEMBERS"
strSql = strSql & " WHERE MEMBER_ID = " & delAr
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
strSql = "SELECT COUNT(T_AUTHOR) AS POSTCOUNT"
strSql = strSql & " FROM " & strTablePrefix & "TOPICS"
strSql = strSql & " WHERE T_AUTHOR = " & delAr
set rs = my_Conn.Execute (strSql)
if not rs.eof then
intPostcount = rs("POSTCOUNT")
else
intPostcount = 0
end if
rs.close
set rs = nothing
strSql = "SELECT COUNT(R_AUTHOR) AS REPLYCOUNT"
strSql = strSql & " FROM " & strTablePrefix & "REPLY"
strSql = strSql & " WHERE R_AUTHOR = " & delAr
set rs = my_Conn.Execute (strSql)
if not rs.eof then
intReplycount = rs("REPLYCOUNT")
else
intReplycount = 0
end if
rs.close
set rs = nothing
strSql = "SELECT COUNT(T_AUTHOR) AS POSTCOUNT"
strSql = strSql & " FROM " & strTablePrefix & "A_TOPICS"
strSql = strSql & " WHERE T_AUTHOR = " & delAr
set rs = my_Conn.Execute (strSql)
if not rs.eof then
intA_Postcount = rs("POSTCOUNT")
else
intA_Postcount = 0
end if
rs.close
set rs = nothing
strSql = "SELECT COUNT(R_AUTHOR) AS REPLYCOUNT"
strSql = strSql & " FROM " & strTablePrefix & "A_REPLY"
strSql = strSql & " WHERE R_AUTHOR = " & delAr
set rs = my_Conn.Execute (strSql)
if not rs.eof then
intA_Replycount = rs("REPLYCOUNT")
else
intA_Replycount = 0
end if
rs.close
set rs = nothing
if ((intReplycount + intPostCount + intA_Replycount + intA_PostCount) = 0) then
strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " WHERE MEMBER_ID = " & delAr
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
else
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " SET M_STATUS = " & 0
strSql = strSql & ", M_EMAIL = ' '"
strSql = strSql & ", M_LEVEL = " & 1
strSql = strSql & ", M_NAME = 'n/a'"
strSql = strSql & ", M_COUNTRY = ' '"
strSql = strSql & ", M_TITLE = 'deleted'"
strSql = strSql & ", M_HOMEPAGE = ' '"
strSql = strSql & ", M_AIM = ' '"
strSql = strSql & ", M_ICQ = ' '"
strSql = strSql & ", M_MSN = ' '"
strSql = strSql & ", M_YAHOO = ' '"
strSql = strSql & " WHERE MEMBER_ID = " & delAr
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
strSql = "UPDATE " & strTablePrefix & "TOTALS"
strSql = strSql & " SET U_COUNT = U_COUNT - " & 1
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
'################## Announcements MOD ###################
tabletoFind = strTablePrefix & "ANNOUNCE"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE A_AUTHOR = " & delAr
Call DoIt
end if
'################## Announcements MOD End ################
'#################### Articles MOD #####################
tabletoFind = strTablePrefix & "ARTICLE_BOOKMARKS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE B_MEMBERID = " & delAr
Call DoIt
end if
tabletoFind = strTablePrefix & "ARTICLE_RATING"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE RATE_BY = " & delAr
Call DoIt
end if
'#################### Articles MOD End ##################
'################### Auction MOD #####################
tabletoFind = strTablePrefix & "AUCTIONBIDS"
if TableExists (tabletoFind) then
strSql = "UPDATE " & tabletoFind & " SET BUYER = '" & 0 & "' WHERE BUYER = " & delAr
Call DoIt
end if
tabletoFind = strTablePrefix & "AUCTIONFEEDBACK"
if TableExists (tabletoFind) then
strSql = "UPDATE " & tabletoFind & " SET BUYERID = '" & 0 & "' WHERE BUYERID = " & delAr
Call DoIt
strSql = "UPDATE " & tabletoFind & " SET SELLERID = '" & 0 & "' WHERE SELLERID = " & delAr
Call DoIt
end if
tabletoFind = strTablePrefix & "AUCTIONITEMS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE SELLER = " & delAr
Call DoIt
end if
'################### Auction Mod End #####################
'##################### Avatar MOD ######################
tabletoFind = strTablePrefix & "ARTICLE_RATING"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE RATE_BY = " & delAr
Call DoIt
end if
strSql = "UPDATE " & strTablePrefix & "AVATAR"
strSql = strSql & " SET A_MEMBER_ID = 0 WHERE A_MEMBER_ID = " & delAr
Call DoIt
'################## Avatar MOD End ###################
'#################### Charts MOD ###################
tabletoFind = strTablePrefix & "CHARTS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE AUTHOR_MEM_ID = " & delAr
Call DoIt
end if
'#################### Charts MOD End ###################
'#################### FileLister MOD ###################
tabletoFind = strTablePrefix & "FILELISTER"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
tabletoFind = strTablePrefix & "FILELISTER_USERS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
'#################### FileLister MOD End #################
'##################### Files MOD #####################
tabletoFind = strTablePrefix & "FILES"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE AUTHOR = '" & aData(2,i) & "'"
Call DoIt
end if
'#################### Files MOD End ####################
'##################### Greeting MOD #####################
tabletoFind = strTablePrefix & "GREETING_SENT"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE FROMNAME = '" & aData(2,i) & "'"
Call DoIt
end if
'#################### Greeting MOD End ###################
'################### Hall of Fame MOD ###################
tabletoFind = strTablePrefix & "HALL_OF_FAME"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE HF_MEMBER_ID = " & delAr
Call DoIt
end if
'################# Hall of Fame MOD End #################
'################### Ignore Poster MOD ##################
tabletoFind = strTablePrefix & "IGNORE_POSTS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE I_MEMBERID = " & delAr & " OR I_IGNOREID = " & delAr
Call DoIt
end if
'################### Ignore Poster MOD ##################
'##################### Maillist MOD #####################
tabletoFind = strTablePrefix & "MAILLIST"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE EMAIL = '" & aData(4,i) & "'"
Call DoIt
end if
'################### Maillist MOD End ###################
'##################### Newsletter MOD ###################
tabletoFind = strTablePrefix & "OPTIN"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE EMAIL = '" & aData(4,i) & "'"
Call DoIt
end if
'################### Newsletter MOD End #################
'#################### Photo Album MOD ####################
tabletoFind = strTablePrefix & "ALBUM"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
tabletoFind = strTablePrefix & "ALBUM_USERS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
'################## Photo Album MOD End ##################
'###################### Poll Mod #########################
tabletoFind = strTablePrefix & "POLL_VOTES"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
'###################### Poll Mod End #####################
'############## Private Messages MOD ###############
tabletoFind = strTablePrefix & "PM"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE M_TO = " & delAr & " OR M_FROM = " & delAr
Call DoIt
end if
'############## Private Messages MOD End ##############
'###################### Requests MOD ###################
tabletoFind = strTablePrefix & "REQUESTS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE RQ_MEMBERID = " & delAr
Call DoIt
end if
'#################### Requests MOD End #################
'###################### Shoutbox MOD ###################
tabletoFind = strTablePrefix & "SHOUTBOX"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE S_NAME = '" & aData(0,i) & "'"
Call DoIt
end if
'#################### Shoutbox MOD End #################
'#################### Staff Tasks MOD ####################
tabletoFind = strTablePrefix & "STAFF_TASKS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE M_NAME = '" & aData(0,i) & "'"
Call DoIt
end if
'################### Staff Tasks MOD End #################
'################### Sub Moderator MOD ##################
tabletoFind = strTablePrefix & "SUB_MODERATOR"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
tabletoFind = strTablePrefix & "SUB_MODID"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr
Call DoIt
end if
'################## Sub Moderator MOD End ################
'################### Topic Ratings MOD ###################
tabletoFind = strTablePrefix & "TOPIC_RATINGS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE RATINGS_BYMEMBER_ID = " & delAr
Call DoIt
end if
'################## Topic Ratings MOD End ################
'################### UserGroup MOD ###################
tabletoFind = strTablePrefix & "USERGROUP_USERS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE MEMBER_ID = " & delAr & " AND MEMBER_TYPE = 1"
Call DoIt
end if
'############### UserGroup MOD End ##############
'## Bookmarks ## User Space Mod ##########################
tabletoFind = strTablePrefix & "BOOKMARKS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE B_MEMBER = " & delAr
Call DoIt
end if
'## Bookmarks ## User Space Mod End ######################
'## Drafts ## User Space Mod #############################
tabletoFind = strTablePrefix & "DRAFTS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE D_AUTHOR = " & delAr
Call DoIt
end if
'## Drafts ## User Space Mod End #########################
'## Friends ## User Space Mod ############################
tabletoFind = strTablePrefix & "FRIENDS"
if TableExists (tabletoFind) then
strSql = "DELETE FROM " & tabletoFind & " WHERE F_FRIEND = " & delAr & " OR F_MEMBER = " & delAr
Call DoIt
end if
'## Friends ## User Space Mod End#########################
end if
End Sub
Sub Sleeper(dur)
starter = now()
do while not DateDiff("s", starter,now()) > dur
' nothing
loop
Response.Write "<meta http-equiv=""Refresh"" content=""5; URL=admin_inactive_users.asp?intDaysOut="&intDaysOut&""">"
Response.End
End Sub
Sub DoIt
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
End Sub
Function TableExists(tabletoFind)
TableExists = False
set adoxConn = CreateObject("ADOX.Catalog")
set adodbConn = Server.CreateObject("ADODB.Connection")
adodbConn.open(strConnString)
adoxConn.activeConnection = adodbConn
isthere = false
for each table in adoxConn.tables
if lcase(table.name) = lcase(tabletoFind) then
isthere = true
exit for
end if
next
adodbConn.close
set adodbConn = nothing
set adoxConn = nothing
if isthere then TableExists = True
End Function
%>
|
|
|
Maxime
Average Member
France
521 Posts |
Posted - 12 May 2014 : 07:00:39
|
Carefree thank you very much, it works fine |
Cordially, Maxime
Taxation consists in so plucking the goose to get the most out of feathers with the least possible cries.(Jean-Baptiste Colbert)
|
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 12 May 2014 : 11:21:55
|
You're welcome. |
|
|
golfmann
Junior Member
United States
450 Posts |
Posted - 04 October 2014 : 14:19:14
|
Rather than delete members, I'd like to flag/unflag them only as inactive and that way I can narrow member lists, etc. Any tips on how to proceed? (It has to do with the member post alerts I am working on). I apologize in advance for my ignorance on inserting database fields and basically a BLOCKHEAD with coding past if then |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 04 October 2014 : 15:57:50
|
Here you go. This will basically set their status back to that of an unvalidated user, without effecting any other settings or data. I removed all of the sections pertaining to deletion, but lock/unlock and email is still supported.
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. 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 an 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:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'###############################################################################
'## Inactive Users version 2.00 for Snitz 3.4.07
'## Originally written for version 3.3 by Sean Gorman (MotoX)
'##
'## Version 1.0 was a collaboration effort between Wesley Brown and Sean Gorman
'##
'###############################################################################
Response.Buffer = true
on error resume next
Server.ScriptTimeout = "1200"
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE file="inc_header.asp" -->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & " Admin Section<br />" & vbNewLine & _
" " & getCurrentIcon(strIconBlank,"","align=""absmiddle""") & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpen,"","align=""absmiddle""") & " Inactive User List<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
Response.Flush
If Request("mode")="active" Then
if mLev > 3 then
Response.Write "Setting member ID: " & Request("MEMBER_ID") & " as inactive.<br>"
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " SET M_STATUS = " & 0
strSql = strSql & " WHERE MEMBER_ID = " & Request("MEMBER_ID")
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
Response.Write "User set inactive. Refreshing page." & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""3; URL=admin_inactive_users.asp"">"& vbNewLine
WriteFooter
Response.End
End If
if Request.QueryString("intDaysOut")<>"" then
if not isNumeric(Request.QueryString("intDaysOut")) then
Response.Write "Number of days must be numeric!" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""3; URL=admin_inactive_users.asp"">"& vbNewLine
WriteFooter
Response.End
else
intDaysOut = cInt(Request.QueryString("intDaysOut"))
end if
end if
if Request.QueryString("submit")="Email" then
intEmailAll=1
else
intEmailAll=0
end if
if intDaysOut = 0 then
intDaysOut = 90
end if
strYear = year(now() - IntDaysOut)
strMonth = month(now() - IntDaysOut)
strMonth = dFormat(strMonth)
strDay = day(now()-intDaysOut)
strDay = dFormat(strDay)
strHour = FormatDateTime(now(),4)
strHour = left(strHour,2)
strMinute = minute(now())
strMinute = dFormat(strMinute)
strSecond = second(now())
strSecond = dFormat(strSecond)
nDate = strYear&strMonth&strDay&strHour&strMinute&strSecond
on error resume next
strSql = "SELECT " &strMemberTablePrefix & "MEMBERS.M_NAME, " &strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " &strMemberTablePrefix & "MEMBERS.M_POSTS, " &strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &strMemberTablePrefix & "MEMBERS.M_EMAIL, " &strMemberTablePrefix & "MEMBERS.M_STATUS"
strSql = strSql & " FROM " &strMemberTablePrefix & "MEMBERS Where "&strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE < '"&ndate&"'"
strSql = strSql & " ORDER BY " &strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE "
Set oRs = Server.Createobject("ADODB.Recordset")
oRs.open strSql, My_Conn
if oRs.EOF then
' Do nothing
else
oRsName=oRs("M_NAME")
aData = oRs.GetRows
oRs.close
end if
set oRs = nothing
if oRsName<>"" then
aDataerr = 0
end if
intRQS=0
for i = 1 to len(Request.QueryString("submit"))
intRQS=intRQS+asc(mid(Request.QueryString("submit"),i,1))
next
if intRQS = 393 then
intLastRecord = ubound(aData,2)+1
for i = 0 to intLastRecord-1
Response.Write "Locking Member ID: " & aData(3,i) & "<br>"
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_STATUS = 0 WHERE MEMBER_ID = " & aData(3,i)
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
next
Call Sleeper(2)
Response.End
end if
if intRQS = 595 then
intLastRecord = ubound(aData,2)+1
for i = 0 to intLastRecord-1
delAr = aData(3,i)
Call DelAll
next
Call Sleeper(2)
Response.End
end if
if intEmailAll = 1 then
strMsg = "This message was sent from " & strForumTitle & _
". This is a warning to inform you that your account may be deleted"& _
" from our system due to inactivity. Should you wish to keep your account"& _
" active, all you need to do is visit our site at: " & strForumURL & _
" If you would like your account to be removed from our system, no action"& _
" is necessary. Thank You. " & strForumTitle
intLastRecord = ubound(aData,2)
intLastRecord = intLastRecord + 1
for i = 0 to intLastRecord - 1
trRecipientsName = aData(0,i)
strRecipients = aData(4,i)
strFrom = STRSENDER
strFromName = "Administrator"
strSubject = "Sent From " & strForumTitle & " by Board Administrator"
strMessage = "Hello " & trim(aData(0,i)) & vbNewline & vbNewline
strMessage = strMessage & "You received the following message from : Administrator (" & STRSENDER & ") " & vbNewline & vbNewline
strMessage = strMessage & "At: " & strForumURL & vbNewline & vbNewline
strMessage = strMessage & strMsg & vbNewline & vbNewline
if Request.QueryString("submit")="Email" then
%>
<!--#INCLUDE FILE="inc_mail.asp" -->
<%
end if
next
if Request.QueryString("submit") = "Email" then
Response.Write " <p align=""center""><font face="""& strDefaultFontFace &""" size="""& strHeaderFontSize &""">All users have been EMailed!</font></p>" & vbNewline
else
Response.Write " <p align=""center""><font face="""& strDefaultFontFace &""" size="""& strHeaderFontSize &""">All users are set to inactive!</font></p>"& vbNewLine
end if
Response.Write " <meta http-equiv=""Refresh"" content=""7; URL=admin_home.asp"">"& vbNewLine & _
" <p align=""center""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><a href=""admin_home.asp"">Back To Admin Home</font></a></p>"& vbNewLine
else
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" function ChangePage(fnum){" & vbNewLine & _
" if (fnum == 1) {" & vbNewLine & _
" document.PageNum1.submit();" & vbNewLine & _
" }" & vbNewLine & _
" else {" & vbNewLine & _
" document.PageNum2.submit();" & vbNewLine & _
" }" & vbNewLine & _
" }" & vbNewLine & _
" </script>" & vbNewLine
mypage = request("page")
if ((Trim(mypage) = "") or (IsNumeric(mypage) = False)) then mypage = 1
mypage = cLng(mypage)
if Request.QueryString("page") <> "" then
intPage = cint(Request.QueryString("page"))
else
intPage = 1
end if
intRecordsPerPage = 10 '10 Records per page
intFirstRecord = (intPage - 1) * intRecordsPerPage
ref = "<div align = ""Center"">"
if intPage > 1 then
ref = ref & "<font face="""& strDefaultFontFace &""" size="""& strFooterFontSize &"""><a href=admin_inactive_users.asp?"
ref = ref &"page=" & intPage - 1
ref = ref &"&intDaysOut="&intDaysOut
ref = ref &">"&getCurrentIcon(strIconGoLeft,"","align=""absmiddle""")&"Previous</a></font> "
end if
if oRsName<>"" then
if intFirstRecord + (intRecordsPerPage - 1) >= ubound(aData,2) then 'We're on the last page
intLastRecord = ubound(aData, 2)
else 'There's more pages - show a next link
intLastRecord = intFirstRecord + (intRecordsPerPage - 1)
ref = ref &" <font face="""& strDefaultFontFace &""" size="""& strFooterFontSize &"""><a href=admin_inactive_users.asp?"
ref = ref &"page=" & intPage + 1
ref = ref &"&intDaysOut="&intDaysOut
ref = ref &">"&getCurrentIcon(strIconGoRight,"","align=""absmiddle""")&"Next</a></font>"
ref = pref & ref
end if
end if
ref = ref &"</div>"
if oRsName<>"" then
if (ubound(aData, 2) / intRecordsPerPage) > cint((ubound(aData, 2) / intRecordsPerPage)) then
maxpages = cint((ubound(aData, 2) / intRecordsPerPage))
maxpages = maxpages + 1
else
maxpages = cint((ubound(aData, 2) / intRecordsPerPage))
end if
end if
Response.Write "<p><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><b>NOTE:</b> The following users have not visited "& STRFORUMTITLE &" in "& intDaysOut &" days or greater.</font></p>" & vbNewLine
if maxpages > 1 then
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""50%"" valign=""bottom""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &""">"
Call DropDownPaging(1)
Response.Write " </font></b></td>" & vbNewLine & _
" <td width=""50%"" align=""right""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strDefaultFontColor &""">" & vbNewLine & _
ref & vbNewLine &_
" </font></b><BR></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
end if
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Username</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Profile</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Last Seen On Forum Date</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Total Posts</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Days Since Last Seen</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Warn Member</font></b></td>" & vbNewLine & _
" <td align=center bgColor="""& strHeadCellColor &"""><b><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""" color="""& strHeadFontColor &""">Delete/Lock Member</font></b></td>" & vbNewLine & _
" </tr>" & vbNewLine
if aDataerr = 1 then
Response.Write " <tr>"& VbnewLine &_
" <td bgcolor="""& strForumCellColor &""" colspan=""7""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><b>No Members Found</b></font></td>" & vbNewLine &_
" </tr>"& VbnewLine
else
if oRsName<>"" then
reccnt = intLastRecord + 1
i = intFirstRecord
do while not(i = reccnt)
strMember = aData(0,i)
strRSLastHere = aData(1,i)
strRSRightNow = strForumTimeAdjust
strLastHere = StrToDate(strRSLastHere)
strRightNow = StrToDate(strRSRightNow)
strOnlineTDays = DateDiff("d",strLastHere,strRightNow)
Response.Write " <tr bgcolor="""& CColor &""">" & vbNewLine & _
" <td bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">" & aData(0,i) &"</font></td>" & vbNewLine & _
" <td align=""center"" bgcolor="""& strForumCellColor &""">" & vbNewLine
if strUseExtendedProfile then
Response.Write " <a href=""pop_profile.asp?mode=display&id="& aData(3,i) &""">" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow3('pop_profile.asp?mode=display&id="& aData(3,i) &"')" & vbNewLine
end if
Response.Write " "&getCurrentIcon(strIconProfile,"","align=""absmiddle""") & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">"& StrToDate(aData(1,i)) &"</font></td>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">"& aData(2,i) &"</font></td>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &""">"& strOnlineTDays &"</font></td>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><a href=""JavaScript:openWindow('pop_warn_mail.asp?id="& aData(3,i) &"')"">" & vbNewLine & _
" "&getCurrentIcon(strIconEmail,"","align=""absmiddle""")&"</a>" & vbNewLine & _
" <td align=center bgcolor="""& strForumCellColor &"""><a href=""JavaScript:openWindow('admin_inactive_users.asp?mode=active&MEMBER_ID="& aData(3,i) &"')"">"&getCurrentIcon(strIconPencil,"","align=""absmiddle""")&"</a>" & vbNewLine
if aData(5,i) = "1" then
Response.Write " <a href=""JavaScript:openWindow('pop_lock.asp?mode=Member&MEMBER_ID=" & aData(3,i) & "')"">" & getCurrentIcon(strIconLock,"Lock Member","hspace=""0""") & "</a></font></td>" & vbNewLine
else
Response.Write " <a href=""JavaScript:openWindow('pop_open.asp?mode=Member&MEMBER_ID=" & aData(3,i) & "')"">" & getCurrentIcon(strIconUnlock,"Unlock Member","hspace=""0""") & "</a></font></td>" & vbNewLine
end if
Response.Write " </tr>" & vbNewLine
i = i + 1
loop
end if
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><BR>" & vbNewLine & _
" <font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><form action=""admin_inactive_users.asp"" method=""get"">" & vbNewLine & _
" Enter Number of Days inactivity you would like to check for: <input type=""text"" name=""intDaysOut"" value="""&intDaysOut&""" size=""3"" maxlength=""5"">" & vbNewLine & _
" <input type=""submit"" value=""Submit"">" & vbNewLine & _
" </font></form>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
end if
if aDataerr = 0 then
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><BR>" & vbNewLine & _
" <b> WARNING! </b> This could take up to 20 minutes to e-mail large groups!" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center""><BR>" & vbNewLine & _
" <font face="""& strDefaultFontFace &""" size="""& strDefaultFontSize &"""><form action=""admin_inactive_users.asp"" method=""get"">" & vbNewLine & _
" <input type=""hidden"" name=""intDaysOut"" value="""&intDaysOut&""">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Inactive"">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Email"">" & vbNewLine & _
" <input type=""submit"" name=""submit"" value=""Lock"">" & vbNewLine & _
" </font></form>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
end if
if strSiteIntegEnabled = "1" then
Response.Write "<table><tr valign=""top""><td valign=""top"">"
end if
WriteFooter
End if
function dFormat(tmp)
lenStr = len(tmp)
if lenStr = 1 then
tmp = "0"&tmp
dFormat = tmp
else
dFormat = tmp
end if
end function
sub DropDownPaging(fnum)
if maxpages > 1 then
if mypage = "" then
pge = 1
else
pge = mypage
end if
scriptname = request.servervariables("script_name")
Response.Write("<form name=""PageNum" & fnum & """ action=""admin_inactive_users.asp"">" & vbNewLine)
Response.Write("<b>Page: </b><select name=""page"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine)
for counter = 1 to maxpages
if counter <> cLng(pge) then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
end if
next
Response.Write("</select><b> of " & maxpages & "</b>" & vbNewLine)
Response.Write("</font>" & vbNewLine)
Response.Write("<input type=""hidden"" name=""intDaysOut"" value=""" & intDaysOut & """>" & vbNewLine)
Response.Write("</form>" & vbNewLine)
end if
top = "0"
end sub
Sub DelAll
if mLev > 3 then
Response.Write "Setting member ID: " & delAr & " as inactive.<br>"
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " SET M_STATUS = " & 0
strSql = strSql & " WHERE MEMBER_ID = " & delAr
my_Conn.Execute (strSql),,adCmdText + adExecuteNoRecords
end if
End Sub
Sub Sleeper(dur)
starter = now()
do while not DateDiff("s", starter,now()) > dur
' nothing
loop
Response.Write "<meta http-equiv=""Refresh"" content=""5; URL=admin_inactive_users.asp?intDaysOut="&intDaysOut&""">"
Response.End
End Sub
%>
|
|
|
|
Topic |
|
|
|