deltypeok.asp

来自「一个关于学校网站教育资源的网站,能实现文件的上载,可以实现教育资源的共响」· ASP 代码 · 共 30 行

ASP
30
字号
<!--#include file="conn.asp"-->
<!--#include file="isadmin.asp"-->
<%
id = trim(request("id"))
if id = "" then
 conn.close
 set conn = nothing
 response.write "<script>alert('请不要捣乱');top.window.location.href='adminmain.asp';</script>"
 response.end
end if

sql = "select * from type where typeid="&id
set rs = server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
 rs.close
 set rs = nothing
 conn.close
 set conn = nothing
 response.write "<script>alert('请不要捣乱');top.window.location.href='adminmain.asp';</script>"
 response.end
end if
rs.close
set rs = nothing
conn.execute "delete from type where typeid="&id
conn.execute "delete from main where idoftype="&id
conn.close
set conn = nothing
response.write "<script>alert('删除成功');window.location.href='addtype.asp';</script>"
%>

⌨️ 快捷键说明

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