📄 role_mdy.asp
字号:
<%
Option Explicit
'----------------------------------------------------------------------------------
'本页:
' 系统角色编辑页面
'说明:
'
'----------------------------------------------------------------------------------
%>
<!--#include file="inc/Config.class.asp"-->
<!--#include file="inc/DBControl.class.asp"-->
<!--#include file="inc/FunctionLib.class.asp"-->
<!--#include file="inc/Manager.class.asp"-->
<%
Dim Cfg, Db, FLib, Admin
Set Cfg = New Config
Set Db = New DBControl
Set FLib = New FunctionLib
Set Admin = New Manager
If Not Admin.Logined Then
FLib.Alert "对不起,你已经超时或未登录","./",1
Response.End
End If
If Not Admin.CheckPopedom("TSYS_GROUP3_ROLE") Then
FLib.Alert "权限不足", "BACK", 0
Response.End
ENd If
Dim Work
Work = Request("Work")
Db.Open()
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/style.css" type="text/css">
<SCRIPT LANGUAGE="JavaScript" src="inc/FunctionLib.js"></script>
<SCRIPT LANGUAGE="JavaScript" src="inc/RCPopedomTable.js"></script>
<SCRIPT LANGUAGE="JavaScript">
<!--
function RoleChange(obj)
{
if(obj.options[obj.selectedIndex].value == -1)
{
if(confirm("是否离开本页?"))
{
self.location.href='Manager_List.asp';
return true;
}else{
return false;
}
}
}
function chkForm_MdyReco(obj)
{
if(obj.title.value == "")
{
alert("[角色名称]不能为空");
obj.title.focus();
return false;
}
return true;
}
//-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%
Select Case Work
Case "MdyPwd" :
MdyPwd()
Case "AddReco" :
AddReco()
Case "MdyReco" :
MdyReco()
End Select
Function AddReco()
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabTitleBar">
<tr>
<td>系统管理 > 角色管理 > 增加角色</td>
</tr>
</table>
<form name="form1" method="post" action="Role_Process.asp" onsubmit="return chkForm_AddReco(this)">
<table width="700" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="25%" align="right">角色名称:</td>
<td width="75%">
<input type="text" name="title" class="input_text">
</td>
</tr>
<tr>
<td width="25%" align="right">备注:</td>
<td width="75%">
<input type="text" name="remark" class="input_text">
</td>
</tr>
<tr>
<td width="25%" align="right" valign="top"> </td>
<td width="75%"> </td>
</tr>
<tr>
<td width="25%" align="right" valign="top"> </td>
<td width="75%">
<input type="submit" name="Submit43" value="提 交" class="input_button">
<input type="reset" name="Submit223" value="复位" class="input_button">
<input type="button" name="Submit323" value="返回" onClick="window.history.back()" class="input_button">
<input type="hidden" name="Work" value="AddReco"> </td>
</tr>
</table>
</form>
<%
End Function
Function MdyReco()
Dim Sql, Rs, rId
rId = FLib.SafeSql(Request("rId"))
Sql = "SELECT TOP 1 * FROM popedom_role WHERE id=" & rId
Set Rs = Db.ExeCute(Sql)
If Rs.Eof And Rs.Bof Then
Rs.Close
Set Rs = Nothing
FLib.Alert "记录不存在", "BACK", 0
Response.End
End If
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabTitleBar">
<tr>
<td>系统管理 > 角色管理 > 修改角色</td>
</tr>
</table>
<form name="form1" method="post" action="Role_Process.asp" onsubmit="return chkForm_MdyReco(this)">
<table width="700" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="25%" align="right">角色名称:</td>
<td width="75%">
<input type="text" name="title" value="<%=Rs("title")%>" class="input_text">
</td>
</tr>
<tr>
<td width="25%" align="right">备注:</td>
<td>
<input type="text" name="remark" value="<%=Rs("remark")%>" class="input_text">
</td>
</tr>
<tr>
<td width="25%" align="right">权限策略:</td>
<td><a href="Other_PopeTacticsCreator.asp?Work=MdyReco&sKey=<%=Rs("id")%>&PTType=Role">点这里调整权限策略</a></td>
</tr>
<tr>
<td width="25%" align="right" valign="top"> </td>
<td> </td>
</tr>
<tr>
<td width="25%" align="right" valign="top"> </td>
<td>
<input type="submit" name="Submit42" value="提 交" <%If Rs("owner") = 1 Then Response.Write "disabled" End If%> class="input_button">
<input type="reset" name="Submit222" value="复位" class="input_button">
<input type="button" name="Submit322" value="返回" onClick="window.history.back()" class="input_button">
<input type="hidden" name="Work" value="MdyReco"> <input type="hidden" name="rId" value="<%=Rs("id")%>">
</td>
</tr>
</table>
</form>
<%
Rs.Close
Set Rs = Nothing
End Function
%>
</body>
</html>
<%
Function Role_List(rId)
Dim Sql, Rs, strChecked
Sql = "SELECT id,title,remark FROM popedom_role"
Set Rs = Db.ExeCute(Sql)
If (rId = -1) Or (Rs.Eof And Rs.Bof) Then
Response.Write "<option value="""" selected> </option>" & vbCrLf
Else
Response.Write "<option value=""""> </option>" & vbCrLf
End If
While Not Rs.Eof
If Rs("id") = rId Then
strChecked = "selected"
Else
strChecked = ""
End If
Response.Write "<option value=""" & Rs("id") & """ " & strChecked & ">" & Rs("title") & "</option>" & vbCrLf
Rs.MoveNext
Wend
Response.Write "<option value=""-1"" style=""background-color:#FFFFCC"">角色管理...</option>" & vbCrLf
Rs.Close
Set Rs = Nothing
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -