<%
Act = Request.QueryString("act")
If Act="postchk" Then
cpid=Request.QueryString("cpid")
Keys = Server.UrlEnCode(Request.QueryString("Keys"))
Ord = Server.UrlEnCode(Request.QueryString("Ord"))
Page = Request.QueryString("Page")
chkact = Request.Form("chkact")
Set Rsd=Server.CreateObject("ADODB.RecordSet")
Set fs=Server.CreateObject("Scripting.FileSystemObject")
For i = 1 To Request.Form("chkbox").Count
Response.Write Request.Form("chkbox")(i)
Rsd.Open "Select picurl From pic Where id="&Request.Form("chkbox")(i),Conn,1,3
If Not Rsd.Bof And Not Rsd.Eof Then
If Left(Rsd(0),8)="/System/" Then
delfile = Server.MapPath(Rsd(0))
If fs.FileExists(delfile) Then
fs.DeleteFile Server.MapPath(Rsd(0)),True
End If
End If
Rsd.Delete
End If
Rsd.Close
Next
Set fs=Nothing:Set Rsd=Nothing:Conn.Close:Set Conn=Nothing
Response.Redirect "?Keys="&Keys&"&Ord="&Ord&"&Page="&Page&"&cpid="&cpid
End If 'End postchk
cpid=Request.QueryString("cpid")
Page = Request.QueryString("Page")
Keys=Server.UrlEnCode(Request.QueryString("Keys"))
Ord=Server.UrlEnCode(Request.QueryString("Ord"))
If cpid="" Or Not IsNumeric(cpid) Then Response.Redirect "protector.asp"
Set Rs=Server.CreateObject("ADODB.RecordSet")
Rs.Open "Select id,picurl From pic Where cpid="&cpid&" Order By Id Desc",Conn,1,1
%>
<%Rs.Close:Set Rs=Nothing:Conn.Close:Set Conn=Nothing%>