<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
id=trim(request("selectedid"))
if trim(id)="" then
response.write "<script language=JavaScript>" & chr(13) & "alert('没有选择记录！');" & "history.back()" & "</script>"
response.end
end if
str2=split(id,",")
set rs=server.createobject("adodb.recordset")
for i=0 to ubound(str2)
sql="select * from [jle_info] where id="&cstr(str2(i))
rs.open sql,conn,1,1
On Error Resume Next
tupian=rs("tupian")
if tupian<>"0" and  tupian<>""  then
   fileExt=lcase(right(tupian,4))
   if (fileEXT=".gif" or fileEXT=".jpg" or fileEXT=".jpeg") and left(tupian,4)<>"http" then
   call deltu()
   end if
end if

dim xurl
xurl=server.mappath("\"&rs("xurl")& "")  
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.fileExists(xurl) then
objFSO.DeleteFile(xurl)
end if
set objfso=nothing
rs.close

sql="delete from [jle_info] where id="&cstr(str2(i))
rs.open sql,conn,1,3
sql1="delete from [jle_fav] where scid='"&cstr(str2(i))&"' "
rs.open sql1,conn,1,3
sql2="delete from [reply] where xxid='"&cstr(str2(i))&"' "
rs.open sql2,conn,1,3
next
sub deltu()
dim whichfile
whichfile=server.mappath("\"& tupian & "")  
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.fileExists(whichfile) then
objFSO.DeleteFile(whichfile)
end if
set objfso=nothing
end sub
response.write "<script language=JavaScript>" & chr(13) & "alert('删除信息成功！')</script>"
response.write "<meta http-equiv=refresh content=""1;URL=admin_information.asp"">"
response.end
rs.close
set rs=nothing
closedb
%>