users_del.asp

来自「这是一款很好的SQL多用户版程序」· ASP 代码 · 共 32 行

ASP
32
字号
<!--#include file="inc_config.asp"-->
<%
If Session.Contents("masterlogin") <> ture Then Response.Redirect "users_list.asp?action=chk"
if(Request.Form("mySQL") <> "") then 
getsql = Request.Form("mySQL")
pagenum = Request.Form("pagenum")
sql = "DELETE FROM mem_db  WHERE " + Replace(getsql, "'", "''") + " "
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = constr
Command1.CommandText = sql
Command1.CommandType = 1
Command1.CommandTimeout = 0
Command1.Prepared = true
Command1.Execute()

sql2 = "DELETE FROM views WHERE " + Replace(getsql, "mem_db", "views") + " "
set Command2 = Server.CreateObject("ADODB.Command")
Command2.ActiveConnection = constr
Command2.CommandText = sql2
Command2.CommandType = 1
Command2.CommandTimeout = 0
Command2.Prepared = true
Command2.Execute()
End if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="1;URL=users_list.asp?action=list&pset=<%=pagenum%>">
<%=sql%><br>
<h1 align="center">执行成功!请后退。</h1>


⌨️ 快捷键说明

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