<!--#include file="mdb.asp"-->
<%
if session("User")="" then
	response.write"<SCRIPT language=JavaScript>alert('您尚未登录！');"
	response.write"location.href=""sd_admin_login.asp"";</SCRIPT>"
end if
%>
<%
	webid=request.QueryString("id")
	if trim(webid)="" then
		Response.Write ("<script language=javascript>alert('无法获得相关ID！');history.back(-1);</script>")
		response.end
	else
sql="select * from sd_Web where sd_id="&id 
rs.open sql,conn,1,1 
%>
<%
'取得页面地址 
html="../"&"html"&"/sd_"&rs("sd_webid")&".html"
filepath = server.mappath(html) 
'创建FSO对象，用于删除文件 
set fso = server.createobject("scripting.filesystemobject") 
'判断文件是否存在，如果存在则删除 
if fso.fileexists(filepath) then fso.deletefile(filepath) 
'关闭RescordSet对象 
rs.close() 

		conn.execute("delete * from [sd_web] where sd_id="&sd_id)
		response.write"<SCRIPT language=JavaScript>alert('网站数据删除成功！');history.go(-1);</SCRIPT>"	
	end if
%>