del_from_db.asp

来自「谁有需要的话可以看看啊 !!不错还凑合源代码」· ASP 代码 · 共 29 行

ASP
29
字号
<!--#INCLUDE FILE="data.asp" -->
<!--#INCLUDE FILE="check.asp" -->

<%
del_id=Request("delid")
del_bz=Request("delbz")
if del_bz<>"My_only" and del_bz<>"My_public" then
    Response.Redirect ("main.asp")
end if
if del_bz="My_public" and Session("Urule")<>"a" and Session("Urule")<>"b" then
    Response.Redirect ("main.asp")
end if
strSql="select * from jhtdata where id="&del_id&" and 链接<>'N/A'"
set del_rs=conn.Execute (strSql)
if not del_rs.eof then
    whichfile=server.mappath(del_rs("链接"))
  Set fs = CreateObject("Scripting.FileSystemObject")
  Set thisfile = fs.GetFile(whichfile)
  thisfile.Delete True
end if
del_rs.close
set del_rs=nothing
strSql="DELETE FROM jhtdata where id="&del_id
conn.Execute (strSql)
conn.Close
set conn = nothing
Response.Redirect "shouqu.asp"
%>

⌨️ 快捷键说明

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