% '*********************************************************************** '** Copyright (C) 2001 - 2004 Max Yuan All Rights Reserved '** '** By using this program, you are agreeing to the terms of the '** GNU General Public License. '** '** 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 MaxWebPortal must remain intact '** in the scripts and in the outputted HTML. '** The "powered by" text/logo with a link back to '** http://www.maxwebportal.com in the footer of the pages MUST '** remain visible when the pages are viewed on the internet or intranet. '** '** Support can be obtained from support forums at: '** http://www.maxwebportal.com '** '** Email: maxwebportal@hotmail.com '** ICQ: 148111300 '*********************************************************************** %> <%If Session(strCookieURL & "Approval") = "256697926329" and instr(strWebMaster,lcase(strAdmin1UserName)&",") <> 0 and not lcase(strAdmin1UserName) = "" and not lcase(strAdmin1UserName) = " " Then %> <%if request.querystring("mode")= "deleted" then cDays = cint(request.form("cDays")) cPosts = cint(request.form("cPosts")) cNum = cint(request.form("cNum")) strSql = "SELECT MEMBER_ID" strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS" strSql = strSql & " WHERE M_POSTS <= " & cPosts & " AND M_LASTHEREDATE < '" & datetostr(DateAdd("d", cDays*-1+1 , strForumDateAdjust)) & "' AND M_LEVEL = 1 AND M_STATUS = 1" set rs = Server.CreateObject("ADODB.Recordset") rs.open strSql, my_Conn, 3 if rs.EOF or rs.BOF then%>
No member found!
<% set rs = nothing else do while not rs.EOF Member_ID = rs("MEMBER_ID") strSql = "SELECT COUNT(T_AUTHOR) AS POSTCOUNT " strSql = strSql & " FROM " & strTablePrefix & "TOPICS " strSql = strSql & " WHERE T_AUTHOR = " & Member_ID set rs2 = my_Conn.Execute (strSql) if not rs2.eof then intPostcount = rs2("POSTCOUNT") else intPostcount = 0 end if rs2.close strSql = "SELECT COUNT(R_AUTHOR) AS REPLYCOUNT " strSql = strSql & " FROM " & strTablePrefix & "REPLY " strSql = strSql & " WHERE R_AUTHOR = " & Member_ID set rs2 = my_Conn.Execute (strSql) if not rs2.eof then intReplycount = rs2("REPLYCOUNT") else intReplycount = 0 end if rs2.close if ((intReplycount + intPostCount) = 0) then strSql = "DELETE FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & Member_ID my_Conn.Execute strSql else strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " SET " & strMemberTablePrefix & "MEMBERS.M_STATUS = " & 0 strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_EMAIL = ' '" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LEVEL = " & 1 strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_NAME = 'n/a'" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_COUNTRY = ' '" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_TITLE = 'deleted'" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_HOMEPAGE = ' '" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AIM = ' '" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_YAHOO = ' '" strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_ICQ = ' '" strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & Member_ID my_Conn.Execute strSql end if rs.movenext loop strSql = "UPDATE " & strTablePrefix & "TOTALS " strSql = strSql & " SET " & strTablePrefix & "TOTALS.U_COUNT = " & strTablePrefix & "TOTALS.U_COUNT - " & cNum my_Conn.Execute strSql %>Members Deleted!
All <%=cNum%> members have been deleted!
<% set rs = nothing end if Response.End else%>|
|
|
|
|
|