<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<%
dim flag
flag=request.cookies("foxwww")("fox")
if flag=10 then
response.Write "<script LANGUAGE='javascript'>alert('您只是后台测试员，请注意身份！');window.location='right.asp';</script>"
response.end
end if%>
<%dim id,rs,sql,rs1,sql1
id=request("id")

'''''''''''''''''''''
'通过FSO组件删除文件'
'''''''''''''''''''''
sql1="select * from FOX_xiao where id="&request("id")
set rs=conn.execute(sql1)
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("spic")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("pic")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p1")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p2")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p3")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p4")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p5")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p6")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p7")).delete
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../shangjiaupfiles")&"\"&rs("p8")).delete
''''''''''''''''''''''
'删除数据记录'''''''''
''''''''''''''''''''''
'sql="Delete from FOX_xinxi where id="&request("id")
'删内为空'''''''''
''''''''''''''''''''''
dim rsr,sqlr
set rsr=server.CreateObject("adodb.recordset")
sqlr="select * from FOX_xiao where id="&request("id")
rsr.open sqlr,conn,1,3
rsr("spic")=""
rsr("pic")=""
rsr("p1")=""
rsr("p2")=""
rsr("p3")=""
rsr("p4")=""
rsr("p5")=""
rsr("p6")=""
rsr("p7")=""
rsr("p8")=""
rsr.update
rsr.close
set rsr=nothing
conn.execute sql
 response.write "<script>alert('删除成功！');this.location.href='editxiao.asp';</SCRIPT>"
response.end
Response.Redirect "editxiao.asp"
%>
</body></html>