<!--#include file="../include/conn.asp"-->
<!--#include file="seeion.asp" -->
<%
'website:http://www.angelasp.com
' Angel工作室技术开发团队:QQ:815657032、QQ：709047174
' Copyright (C) Angel工作室 (http://www.angelasp.com).  All rights reserved
If request.QueryString("id") = "" Or Not IsNumeric(request.QueryString("id")) Then
    response.Write "<script language=javascript>alert(""非法操作！"");window.history.back();</script>"
    response.End
End If
Set rs = server.CreateObject("adodb.recordset")
sql = "select * from banner where id = "&request.QueryString("ID")&""
rs.Open sql, conn, 1, 3
If rs.EOF Then
    rs.Close
    Set rs = Nothing
    conn.Close
    Set conn = Nothing
    response.Write "<script language=javascript>alert(""不存在此数据！"");window.history.back();</script>"
    response.End
Else
   if rs("banner_pic")<>"" then
   Set fso = CreateObject("Scripting.FileSystemObject")
   if fso.FileExists(server.MapPath(".." & rs("banner_pic"))) then
   fso.DeleteFile(server.MapPath(".." & rs("banner_pic")))
   end If
   end if
   rs.Delete
   rs.update
   rs.Close
   Set rs = Nothing
   conn.Close
   Set conn = Nothing
   response.Write "<script language=javascript>alert(""幻灯删除成功！"");window.location.href=""banner.asp""</script>"
   response.End
End If

%>
