⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 del_lanmu.asp

📁 功能最强大的ASP网站
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="setting.asp"-->
<%
dim bhx,classname,classname2
classname=request("classname")
classname2=request("class")
if classname2="shop_class" then
afilepath="shop"
database="shops"
end if
if classname2="download_class" then
afilepath="downloads"
database="downloads"
end if
bhx="1"
if (request("bh")<>"")then
bhx=request("bh")
end if

sql = "Select * from "&classname2&" where bh="+ bhx
Set rs = Server.CreateObject ("ADODB.Recordset")
rs.Open sql,conn,2,3
now_class=rs("classname")

sql1 = "Select * from "&database&" where bigclassname='"&now_class&"'"
Set rs1 = Server.CreateObject ("ADODB.Recordset")
rs1.Open sql1,conn,2,3
do while not rs1.eof
del_bh=rs1("bh")
FilePath=Server.MapPath(""&afilepath&"/"&del_bh&".html") 
Dim fso 
Set fso = CreateObject("Scripting.FileSystemObject") 
IF fso.FileExists(FilePath) Then 
fso.DeleteFile(FilePath) 
End IF
response.Write(FilePath)
response.Write("<br>")
rs1.delete
rs1.movenext
loop
Set fso = Nothing
%>
<%rs.delete%>
<%rs.close%>
<%set rs=nothing%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<p>
<%
response.Redirect("admin_right.asp?url=admin_center.asp&reason=成功删除")
%>
</p>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -