del.asp

来自「学校网站管理系统」· ASP 代码 · 共 39 行

ASP
39
字号
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="sqlx.asp"-->
<%
call hacker()
call yecaosql()
SoftID=trim(request("SoftID"))
Action=Trim(Request("Action"))
tab=request("tab")
url=request("url")
if Action="" then
response.Write"<script>alert('参数不足!');</script>"
response.Write"<script>history.go(-1);</script>"
end if
if SoftID="" then
response.Write"<script>alert('请选择要操作的记录!');</script>"
response.Write"<script>history.go(-1);</script>"
end if
call DelSoft()
sub DelSoft()
if instr(SoftID,",")>0 then
SoftID=replace(SoftID," ","")
sqlDel="select * from "&tab&" where id in (" & SoftID & ")"
else
SoftID=Clng(SoftID)
sqlDel="select * from "&tab&" where id =" & SoftID
end if
Set rsDel= Server.CreateObject("ADODB.Recordset")
rsDel.open sqlDel,conn,1,3
do while not rsDel.eof
rsDel.delete
rsDel.movenext
loop
rsDel.close
set rsDel=nothing
response.Write"<script>alert('恭喜您!删除成功拉!');location.href='"&url&"';</script>"
end sub
%>

⌨️ 快捷键说明

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