<%
 data_path="../" 'ACC连接数据库路径，对SQL无效 
  numid="no"
 dir="no"
%>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/FileSyStem.asp"-->
<!--#include file="../inc/safe.asp"-->
 <%
if issession=0 then
%>
<!--#include file="inc.asp"-->

<%
	If boollogin=false then
              Response.write "<script language='javascript'>"
              Response.write"alert('对不起！请重新登陆！');parent.location.href='"&HOPE_InstallDir&"';</SCRIPT>" 
              Response.End
   End If
  else
	  if session("globalecmaster")="" and  session("masterflag")="" then
              Response.write "<script language='javascript'>"
              Response.write"alert('对不起！请重新登陆！');parent.location.href='"&HOPE_InstallDir&"';</SCRIPT>" 
              Response.End
   End If
 
 end if
%>
<%
if Replace_Text(Request.QueryString("id"))<> "" then

id = replace(Request.QueryString("id"),"'","")


Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from [Websen_ad] where id=" & id
rs.Open sql,conn,1,3
if Not Rs.Eof then 
	 PICName=rs("ADSrc")
	 FileName=HOPE_InstallDir&"ads/js/"&Rs("ADID")&".js"
	 if instr(PICName,"nopicture.gif")<=0 then
	Call FileDel(PICName) '删除图片
	end if
	Call FileDel(FileName) '删除JS文件
End if
rs.Delete 
set rs=nothing
conn.Close
set conn=nothing
Response.Write ("<script>window.location.href='list.asp'</script>")

else
Response.Write "参数错误"
end if
%>