⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 userinforolesql.asp

📁 蓝芒3.0A最新所有功能完整破解版
💻 ASP
字号:
<% ModuleCode="M0110" %>
<!--#include file="../../Include/connect.asp"-->
<!--#include file="../../Include/Security.asp"-->
<%

act = Request("act")
UserID=Request("UserID")

OPTable="T_DNS_UserRole"
OPIP=Request.ServerVariables("REMOTE_ADDR")
OPModule="用户角色维护"
OPPK=UserID
OPType=act

Cn.Execute("SP_UserOP "&session("UserID")&",'"&OPTable&"','"&OPModule&"','"&OPPK&"','"&OPType&"','"&OPIP&"'" )

Set Rs= Server.CreateObject("ADODB.Recordset")

'删除所有记录
strSQL="delete  from T_DNS_UserRole where UserID=" & UserID
Cn.Execute(StrSQL)	

'增加记录
strSQL="select RoleCode from T_DNS_RoleInfo"
Rs.open strSQL,Cn,1,1
if rs.bof and rs.eof then
    response.write "<table width='400' height='80' border='0' cellpadding='0' cellspacing='2' bgcolor='#FFCC00'><tr>"
	response.write "<td align='center' bgcolor='#FFFFFF'>"
	response.write "<font color='#FF0000'><strong>警告:&nbsp; 没有角色信息!!! &nbsp; <a href='javascript:history.go(-1)'>返回</a></strong></font></td></tr></table>"
	response.end
end if

'有角色记录
RS.MoveFirst
do while (not Rs.eof)
	if len(request(rs("RoleCode")))>0 then
		StrSQL="insert into T_DNS_UserRole (UserID,RoleCode) values (" & UserID & ",'"& RS("RoleCode") & "')"
		Cn.Execute(StrSQL)
	end if
    Rs.MoveNext
Loop
Rs.Close

Response.Redirect "UserInfo.asp"
%>

⌨️ 快捷键说明

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