📄 changeuserstatus.asp
字号:
<!-- #include file="sysconfig.asp" -->
<!--#include file="checkadmin.asp" -->
<%
dim uid,act,act2,IsTrueError
uid=CheckStr(Trim(Rst("ID")))
act=CheckStr(Trim(Rst("act")))
act2=LCase(CheckStr(Trim(rst("act2"))))
if uid<>"" and act<>"" then
set rs = server.createobject("adodb.recordset")
rs.open "select regvalidated,regusername,degrade,credit,regadmin from users where regID In ("& UId &")",conn,1,3
if rs.eof then
Call AlertInfo("用户参数传递有误,请返回重新提交!","finduser.asp",1)
else
Do while Not Rs.Eof
if act2="zl" then
if act="yes" then
rs("regvalidated")="Y"
elseif act="no" then
rs("regvalidated")="N"
else
IsTrueError=1
end if
rs.update
IsTrueError=0
elseif act2="sf" then
if act="yes" then
rs("degrade")="身份证"
rs("credit")=rs("credit")+creditpresent
elseif act="no" then
Dim TempM
rs("degrade")="无"
tempm=rs("credit")-creditpresent
if tempm<0 then tempm=0
rs("credit")=tempm
else
IsTrueError=1
end if
rs.update
IsTrueError=0
elseif act2="lock" then
If Act="yes" then
Rs("regAdmin")="Y"
elseif Act="no" then
Rs("regAdmin")="N"
else
IsTrueError=1
end if
rs.update
IsTrueError=0
else
IsTrueError=1
end if
Rs.MoveNext
Loop
end if
rs.close
set rs=nothing
if IsTrueError=1 then
Call AlertInfo("出错了,请重新尝试此操作!","",0)
else
Call AlertInfo("恭喜你,用户信息更新成功!",Cnbbr_ComeUrl,1)
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -