<% Dim totalPage, totalRecords, displayRecords If Not Sess_Array(48) = Session.SessionID then UpdateSessions False Response.Redirect "default.asp" End If msgNomarkes = "
There are no replies to users ads found. RESET
" Select Case Request.Form("act") Case "delete" flag = CLng(Request.Form("C1")) dateRange = CLng(Request.Form("D1")) If dateRange > 0 then setLocale server_locale sdd = dd(objConn) baseDate = Date - dateRange baseDate = ConvDate(baseDate) strCondition = " WHERE rdate < " & sdd & baseDate & sdd If flag = 1 then strCondition = strCondition & " AND flag = 0 " ElseIf dateRange = 0 Then If flag = 1 then strCondition = " WHERE flag = 0 " End If strSQL = "DELETE FROM " & tablPfx & "Reply " & strCondition & ";" objConn.Execute(strSQL) UpdateSessions False Response.Redirect "admin_replies.asp?" & Request.Querystring End select If Len(Request("id")) > 0 And isNumeric(Request("id")) then strFilter = " AND " & tablPfx & "Reply.userID = " & CLng(Request("id")) isUserOnly = True End If strSQL = "SELECT " & tablPfx & "Reply.*," & tablUPfx & "User.nick FROM " & tablPfx & "Reply, " & tablUPfx & "User " strSQL = strSQL & "WHERE " & tablUPfx & "User.userID = " & tablPfx & "Reply.userID " & strFilter & " ORDER BY rdate DESC;" set rs = objConn.Execute(strSQL) If not rs.EOF then %>
Replies to Users Ads
<% If isUserOnly = True then Response.Write "SHOW ALL

" nPage = Sess_Array(21) URLlink = "admin_replies.asp?" & Server.URLEncode(Request.Querystring) pageType = 31 strPaging = buildPages(nPage, URLlink, pageType) '## paging built in libraries.asp Response.Write strPaging Response.Write "
Total Pages: " & totalPage & "
" Response.Write "Total Replies: " & totalRecords & "
" %>
      - "REMOVE" Flagged Only

<% Call Build_List_Top("center", "99%", "xl_list") %> <% For J = 1 to displayRecords If rs.EOF then Exit For Else iDate = rs("rdate") senderName = rs(2) senderEmail = rs(3) userID = rs(4) uNick = rs("nick") strUser = "" & uNick & " (" & userID & ")
" & uNick & " in User Manager
" strUser = strUser & "Show Only " & uNick & " Replies
" senderString = "" & senderName & "" message = rs(5) adName = rs(6) adID = rs(7) flag = CLng(rs(8)) IP = rs(9) If flag = 0 then isFlagged = "REMOVE": Else: isFlagged = "KEEP" adTitle = "" & adName & "" If J mod 2 = 0 then cellColor = "class='evencell'": Else: cellColor = "class='oddcell'" %> <% rs.MoveNext End If Next %>
Replied on: User: Ad Title: Sender: Message: Flag*
><%= iDate %> style="text-align:center"><%= strUser %> > <%= adTitle %> ><%= senderString %>
IP: <%= IP %>
> ><%= isFlagged %>
<% Call Build_List_Bottom() %>
*Flag: REMOVE means user removed this reply from an account. KEEP means user is still keeping this reply in the list.
NOTE: When user removes a reply from the list, the message is not actually deleted from database but rather gets a REMOVE flag instead.
 
<% Else: Response.Write msgNomarkes End If rs.close %>