admin_usersave.asp

来自「本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置」· ASP 代码 · 共 45 行

ASP
45
字号
<!--#include file="../conn.asp"--><!-- #include file="session.asp" --><!--#include file="../inc/config.asp"-->
<%
id=CheckSql(request("id"))
CheckSqlnum(id)
id=int(id)
page=replace(trim(request("page")),"'","")
act=request("act")

set rs=server.CreateObject("ADODB.RecordSet")
	if act="lock" then
		sql="select lockuser from userinfo where id="&id
		rs.open sql,conn,1,3
		if not rs.eof then
			if rs("lockuser")=0 then
				conn.execute ("update userinfo set lockuser=1 where id="&id)
			else
				conn.execute ("update userinfo set lockuser=0 where id="&id)
			end if
		end if
		rs.close
	elseif act="IsVipUser" then
		sql="select IsVipUser from userinfo where id="&id
		rs.open sql,conn,1,3
		if not rs.eof then
			if rs("IsVipUser")=0 then
				conn.execute ("update userinfo set IsVipUser=1 where id="&id)
			else
				conn.execute ("update userinfo set IsVipUser=0 where id="&id)
			end if
		end if
		rs.close
	elseif act="GOGXuser" then
		conn.execute ("update userinfo set GO_GXuserAnswer='',GO_GXuser=0,GOGXuser=1 where id="&id)
	elseif act="author" then
		conn.execute ("update userinfo set GOauthor=0 where id="&id)
		conn.execute ("update author set author_addpost=0 where author_UserID="&id)
	elseif act="GXuser" then
		conn.execute ("update userinfo set GOGXuser=0 where id="&id)
	end if
set rs=nothing
conn.close
set conn=nothing
response.write ("<script>opener.location.reload();</script>")
Call ShowAdminSuccessMsg("操作成功!","javascript:window.close()")
%>

⌨️ 快捷键说明

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