<% if request.form <> "" then Dim mode, strSQL, objRS, objCon, allData, hasSearch, appid dim forumid:forumid = request.form("forumid") dim firstCheck dim firstBox, firstHidden:firstHidden = "" dim secondCheck dim secondBox, secondHidden:secondHidden = "" dim thirdCheck dim thirdBox, thirdHidden:thirdHidden = "" dim fourthCheck dim mAction mode = request.queryString("mode") strSQL = _ "SELECT count(Distinct threadID), count(messageID) from pgd_messages WHERE forumid = "&forumid&" and threadID in ( "&_ "SELECT threadID from pgd_messages WHERE parent = 0 and forumID = "&forumid&" " firstCheck = request.form("2_p_c") firstBox = ""&request.form("2_p_t") secondCheck = request.form("2_l_c") secondBox = ""&request.form("2_l_t") thirdCheck = request.form("2_s_c") thirdBox = ""&request.form("2_s_t") fourthCheck = request.form("2_b_c") hasSearch = false 'strSQL = strSQL & "AND totalposts > 0 " if firstCheck = "on" and firstBox <> "" and isNumeric(firstBox) then strSQL = strSQL & "AND lastupdate < DateADD (dd, "&-Clng(firstBox)&", GetDate()) " hasSearch = true firstHidden = -Clng(firstBox) end if if secondCheck = "on" and secondBox <> "" and isNumeric(secondBox) then strSQL = strSQL & "AND totalreply < "&Clng(secondBox)&" " hasSearch = true secondHidden = secondBox end if if thirdCheck = "on" and thirdBox <> "" and isNumeric(thirdBox) then strSQL = strSQL & "AND hits < "&Clng(thirdBox)&" " hasSearch = true thirdHidden = thirdBox end if if fourthCheck = "1" then mAction = "Deleted" else mAction = "Locked" strSQL = strSQL & "AND Locked = 0 " end if if hasSearch = false or forumid = "" then response.redirect ("admin_m_delete.asp") response.end end if strSQL = strSQL & ")" ' response.write(strSQL) ' response.end set objRS = server.createobject("adodb.recordset") with objRS '.CacheSize = 50 .open strSQL, datastore, , , adCmdText If not (.EOF or .BOF) then allData = .getrows End if .close end with set objRS=nothing if allData(0,0) = 0 then response.redirect ("admin_m_delete.asp?done=no") dim i, memIDs allForum=Application(dbName&"foruminfo") appid = ForumIdToAppid(forumid) %> Mass Message Pruning <%= OutputCSS() %>
Mass Message Pruning :       Help

> >
Analysis Results
Forum Name Total Topics will be <%= mAction %> Total Posts will be <%= mAction %>
<%= allforum(1,appid) %> <%= allData (0,i) %> <%= allData (1,i) %>


 

<% response.end end if %> Mass Message Pruning <%= OutputCSS() %>
Mass Message Pruning / Locking:       Help

<% if request.querystring("done") = "no" then response.write("Nothing matches your criteria!
") %> <% if request.querystring("done") = "yes" then response.write("Messages deleted / locked successfully!
") %>
> > > > > >
Mass Message Pruning / locking options
class="subhead">For topics in:
>
> are older than days
> have less than replies
> receive less than hits (views)
> Specify your action: Delete Lock