<!--#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组件删除文件'
'''''''''''''''''''''
sql="select adpic from FOX_xinxi where id="&request("id")
set rs=conn.execute(sql)
Server.CreateObject("Scripting.FileSystemObject").GetFile(server.mappath("../adupfiles")&"\"&rs("adpic")).delete
''''''''''''''''''''''
set rs1=server.createobject("adodb.recordset")
sql1="select adpic from [FOX_xinxi] where id="&id&""
rs1.open sql1,conn,1,3
rs1("adpic")="0"
rs1.update
 response.write "<script>alert('删除成功！');this.location.href='ad_edit.asp?id="&id&"';</SCRIPT>"
response.end
Response.Redirect "ad_edit.asp?id="&id&""
%>
</body></html>