changeuserstatus2.asp

来自「. 缓存处理技术」· ASP 代码 · 共 63 行

ASP
63
字号
<!-- #include file="sysconfig.asp" -->
<!--#include file="checkadmin.asp" -->
<%
Call CheckAdminFlag(TempAdminFlag,3)



dim uid,act,act2
uid=rst("userid")
act=rst("act")
act2=LCase(rst("act2"))
if not IsNum(Uid) then Call AlertInfo("用户参数传递有误,请返回重新提交!","finduser.asp",1)

if uid<>"" and act<>"" then
   set rs = server.createobject("adodb.recordset")
   rs.open "select regvalidated,regusername,degrade,credit,regadmin from users where regID="& UId,conn,1,3
   if rs.eof then
      Call AlertInfo("用户参数传递有误,请返回重新提交!","",0)
   end if
   if act2="zl" then
      if act="yes" then
         rs("regvalidated")="Y"
      elseif act="no" then
         rs("regvalidated")="N"
      else
	 Call AlertInfo("错误的用户审核参数传递,请返回重新提交!","",0)
      end if
      rs.update
      Call AlertInfo("用户资料审核状态更新成功!",Cnbbr_ComeUrl,1)
   elseif act2="sf" then
      if act="yes" then
         rs("degrade")="身份证"
         rs("credit")=rs("credit")+creditpresent
      elseif act="no" then
         rs("degrade")="无"
	 Dim TempM
         tempm=rs("credit")-creditpresent
         if tempm<0 then tempm=0
         rs("credit")=tempm
      else
	 Call AlertInfo("用户身份认证参数传递有误,请返回重新提交!","",0)
      end if
      rs.update
      Call AlertInfo("用户身份认证状态更新成功!",Cnbbr_ComeUrl,1)
   elseif act2="lock" then
      If Act="yes" then
	 Rs("regAdmin")="Y"
      elseif Act="no" then
	 Rs("regAdmin")="N"
      else
	 Call AlertInfo("用户帐户锁定参数传递有误,请返回重新提交!","",0)
      end if
      rs.update
      Call AlertInfo("用户帐户锁定状态更新成功!",Cnbbr_ComeUrl,1)
   else
      Call AlertInfo("用户帐户锁定参数传递有误,请返回重新提交!","",0)
   end if

   rs.close
   set rs=nothing
end if
%>

⌨️ 快捷键说明

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