Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Mod to Delete Multiple Members at one time

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
leblanc9425 Posted - 04 October 2010 : 14:16:44
Is there a Mod that would allow me to delete multiple (lots) of members at one time? My forum has hundreds of members, some are spammer and some are just people that have moved out of the area and have not accessed the forum in years (many years).

The problem is that I have to delete each member one at a time (will take forever to do it this way). Is there a Mod or way to delete hundreds of members easily without messing up the message board?

I have applied the "Inactive Users" mod and it helps me identify those who have not access the forum, but I still have to delete them one at a time.
3   L A T E S T    R E P L I E S    (Newest First)
Carefree Posted - 22 October 2010 : 14:46:50
Don't know if anyone is still interested in this, but thought I'd change the inactive users mod to support it. This version will now delete users (and anything other than posts related to them) from the basic forum and the following mods:
  • Announcements
  • Articles
  • Auction
  • Avatar
  • Charts
  • Filelister
  • Files
  • Greeting Cards
  • Hall of Fame
  • Ignore Poster
  • Maillist
  • Newsletter
  • Photo Album
  • Polls
  • Private Messages
  • Requests
  • Shoutbox
  • Staff Tasks
  • Sub-Moderator
  • Topic Ratings
  • User Groups
  • User Space - Bookmarks
  • User Space - Drafts
  • User Space - Friends


If a mod is listed that you're not using, it will check for the presence of tables before trying to edit them, so you will not need to modify the file unless you're using a mod that isn't listed.

I added lock/unlock of individual members and mass-lock for those depicted in version 2.2.

Get it on SnitzBitz or copy/paste following code:

"admin_inactive_users.asp"


<%
'###############################################################################
'##
'##			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" -->
<% 
if Session(strCookieURL & "Approval") = "15916941253" Then 
	%> 
	<!--#INCLUDE FILE="inc_func_common.asp" -->
	<!--#INCLUDE file="inc_header.asp" -->
	<%
	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
	end if
	oRs.close
	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
		end if
	if strSiteIntegEnabled = "1" then
		Response.Write	"<table><tr valign=""top""><td valign=""top"">"
	end if
	WriteFooter
else
	scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
	Response.Redirect "admin_login.asp?target=scriptname"
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
%>
leblanc9425 Posted - 05 October 2010 : 14:53:45
AnonJr,
Thanks for posting the comments because it made re-consider why I was deleting these old members in the first place. You are correct in that it really isn't taking up much space so that isn't the issue. I guess I just wanted to clean things up because I have over 15,000 registered members but there are hundreds (if not thousands) who have not posted anything in over 5-6 years.

What really prompted me to look into deleting old members was that I got a lot of bounced emails from a newsletter that I re-started (have not sent one out in years). Anyway, my broadcast email software keeps track of bounced emails so it doesn't re-send to a bad address anyway.

Thanks again for the comments. Now, I agree with you on virtually all your points. I think I will just keep them as members!!

Dave

AnonJr Posted - 04 October 2010 : 14:47:13
Not the answer you're looking for, but I have to ask why are you deleting them?

If they've not been around, you really should consider keeping the account around in case they do decide to return. Its awfully frustrating to come back after an extended leave of absence from a community to find you've essentially been kicked out. From my own experience I don't re-join those sites, but that may just be a quirk of my own.

If they are spammers, I'd lock the account to at least prevent them from re-using the e-mail address they used the first time (assuming that you do require unique e-mail addresses... which is generally recommended). While not always an appreciable reduction in noise, it does block the bots too lazy to try multiple addresses.

Even if none of the above is convincing enough, you should still retain the accounts to provide a record of authorship for old posted material. If someone runs across an old thread, it is still useful to know who posted it - deleting the user removes that information and can decrease the usefulness of that post.

Lastly, the accounts aren't taking up a whole lot of space in the grand scheme of things, and unless I missed something somewhere, shouldn't be causing an appreciable impact in performance. Really its only if the latter is noticed (and traced back to the excessive old accounts) that I would look at "pruning" the members list.

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07