admin_st_delok.asp

来自「一、一般游客: 1.查看论坛资料 二、注册会员: 1.修改本人资料 」· ASP 代码 · 共 63 行

ASP
63
字号
<%
if request.Cookies("user")<>"管理员" then
response.Write("未知来源!请先登陆!")
response.End()
end if
 %>
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
	UserId=trim(request("keywords"))
	set rsUser=server.createobject("adodb.recordset")
   sqltext="delete * from stinfor where st_name='"& UserId&"'"
   rsUser.open sqltext,conn,3,3

	 set rsUser=nothing
       	set rsUser=server.createobject("adodb.recordset")
	    sqltext="select hy_st from hyinfor where hy_st like '%"&UserId&"%'"
	    rsUser.open sqltext,conn,3,3
		%>
		<%
		while not rsUser.Eof
         %>
       <%
       resl=trim(rsUser("hy_st"))
	   resl = replace(""&resl&"", ""&UserId&"","")
	   resl = replace(""&resl&"",",,",",")
	   rsUser("hy_st") = trim(resl)
		rsUser.MoveNext()
		%>
		<%
      Wend
	  %>
	  <%
	'	rsUser.update
		rsUser.close
		
		 set rsUser=nothing
       	set rsUser=server.createobject("adodb.recordset")
	    sqltext="select hy_st from hydsh where hy_st like '%"&UserId&"%'"
	    rsUser.open sqltext,conn,3,3
		%>
				<%
		while not rsUser.Eof
         %>
       <%
       resl=trim(rsUser("hy_st"))
	   resl = replace(""&resl&"", ""&UserId&"","")
	   resl = replace(""&resl&"",",,",",")
	   rsUser("hy_st") = trim(resl)
		rsUser.MoveNext()
		%>
		<%
      Wend
	  %>
		
		<%
'	rsUser.update
		rsUser.close	
		 conn.close
		response.write "<script language=JavaScript>{window.alert('资料成功删除!');window.location.href='admin_st.asp'}</script>"
	response.end
%>

⌨️ 快捷键说明

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