
<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()
call saycarda("文件删除结果")
%>


<% dim rs,sql,id,idd,url,pic,TP
   TP=trim(request.querystring("TP"))
   lid=int(request.QueryString("lid"))
   id=int(request.QueryString("id"))
   idd=request.querystring("idd")
   set rs=server.CreateObject ("ADODB.Recordset") 
rs.open "Select * from xzfile where id="&id ,conn,2,3  
If Not rs.eof	Then
if rs("url")<>"" then
Set fso = server.CreateObject("Scripting.FileSystemObject")
	IF (fso.FileExists(Server.MapPath(replace(rs("url"),"http://"&request.ServerVariables("Server_NAME")&"","")))) Then
	Set delfile = fso.GetFile(Server.MapPath(replace(rs("url"),"http://"&request.ServerVariables("Server_NAME")&"","")))
	delfile.Delete
	set delfile=nothing
	end if
set fso=nothing
	end if
if rs("pic")<>"" then
Set fso = server.CreateObject("Scripting.FileSystemObject")
	IF (fso.FileExists(Server.MapPath(replace(rs("pic"),"http://"&request.ServerVariables("Server_NAME")&"","")))) Then
	Set delfile = fso.GetFile(Server.MapPath(replace(rs("pic"),"http://"&request.ServerVariables("Server_NAME")&"","")))
	delfile.Delete
	set delfile=nothing
	end if
set fso=nothing
	end if
rs.delete
rs.update  
Response.Write "文件删除成功!" 
else
Response.Write "文件删除失败!可能已删除或者文件不存在" 
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
<br/>----------<br/>
<%if TP<>"" THEN%>
<a href='wjpass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件审核]</a><br/>
<%else%>
<a href="wjlist.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;lid=<%=lid%>&amp;idd=<%=idd%>">[文件列表]</a><br/>
<a href='wjdl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>&amp;idd=<%=idd%>'>[文件小类]</a><br/>
<a href='wjclass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件大类]</a><br/>
<%end if%>
<a href='wjcl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件管理]</a><br/>
<a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%call headsay()%>
