📄 setrightsforuser.jsp
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="description" content="用户授权">
<script type="text/javascript">
function changeCheckUser() {
var x = document.getElementsByName("userManage");
if(x[1].checked == true || x[2].checked == true || x[3].checked == true || x[4].checked == true
|| x[5].checked == true || x[6].checked == true || x[7].checked == true ) {
x[0].checked = true;
}else {
x[0].checked = false;
}
}
function changeAll(obj){
var x = document.getElementsByName(obj.name);
if(x[0].checked == false){
for(var i = 1; i < x.length; i++ ){
x[i].checked = false;
}
}
}
function changeCheckRole() {
var x = document.getElementsByName("roleManage");
if(x[1].checked == true || x[2].checked == true || x[3].checked == true || x[4].checked == true
|| x[5].checked == true ) {
document.getElementById("rm_all").checked = true;
}else {
document.getElementById("rm_all").checked = false;
}
}
function changeCheckCustomer() {
var x = document.getElementsByName("customerManage");
if(x[1].checked == true || x[2].checked == true || x[3].checked == true || x[4].checked == true) {
x[0].checked = true;
}else {
x[1].checked = false;
}
}
function changeCheckContact() {
var x = document.getElementsByName("contactManage");
if(x[1].checked == true || x[2].checked == true || x[3].checked == true || x[4].checked == true) {
x[0].checked = true;
}else {
x[0].checked = false;
}
}
function changeCheckBusiOpport() {
var x = document.getElementsByName("busiOpportManage");
if(x[1].checked == true || x[2].checked == true || x[3].checked == true || x[4].checked == true) {
x[0].checked = true;
}else {
x[0].checked = false;
}
}
function changeCheckBusiAct() {
var x = document.getElementsByName("busiActivityManage");
if(x[1].checked == true || x[2].checked == true || x[3].checked == true || x[4].checked == true) {
x[0].checked = true;
}else {
x[0].checked = false;
}
}
</script>
<title>用户授权</title>
<link href="${pageContext.request.contextPath}/css/global.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
</head>
<body>
<form action="${pageContext.request.contextPath}/admin/user.do?method=setRightsForUser" method="post">
<table class="basic-table" cellspacing="1" cellpadding="0" align="center" width="97%">
<caption class="bar-violet-dark">
给 ${requestScope.userPer.familyName } 授权
</caption>
<tr>
<th height="10" colspan="6">
</th>
</tr>
<tr class="gray">
<td colspan="6" align="center">
<label for="um_all">
<strong>功能权限</strong>
</label></td>
</tr>
<tr align="center">
<td height="20" colspan="10">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="2" bgcolor="#D5E4F4">
<tr>
<td></td>
</tr>
</table>
</td></tr>
<tr class="gray">
<td colspan="6">
<label for="um_all">
<strong>系统管理</strong>
<input type="checkbox" name="xiTongManage" value="XiTongM_ALL" id="xiTongManage"
<logic:iterate id="right" name="rights"> <c:if test="${right!='XiTongM_ALL'}">checked</c:if></logic:iterate>>
</td>
</tr>
<tr align="center">
<td height="20" colspan="10">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="2" bgcolor="#D5E4F4">
<tr>
<td></td>
</tr>
</table></td>
</tr>
<tr class="gray">
<td colspan="6">
<label for="um_all">
<strong>用户管理</strong>
<input type="checkbox" name="userManage" value="UserM_ALL" id="um_all" onclick="changeAll(this);"
<logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_ALL'}">checked</c:if></logic:iterate>>
</td>
</tr>
<tr align="left" class="gray">
<td nowrap="nowrap">
<label for="um_add">
添加用户
</label>
<input type="checkbox" name="userManage" value="UserM_ADD"
id="um_add" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_ADD'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="um_grant">
授权用户
</label>
<input type="checkbox" name="userManage" value="UserM_GRANT"
id="um_grant" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_GRANT'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="um_update">
更新用户
</label>
<input type="checkbox" name="userManage" value="UserM_UPDATE"
id="um_update" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_UPDATE'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="um_query">
查询用户
</label>
<input type="checkbox" name="userManage" value="UserM_QUERY"
id="um_query" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_QUERY'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="um_del">
删除用户
</label>
<input type="checkbox" name="userManage" value="UserM_DEL"
id="um_del" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_DEL'}">checked</c:if></logic:iterate>>
</td>
</tr>
<tr align="left" class="gray">
<td nowrap="nowrap">
<label for="UM_VIEW_PERM">
查看权限
</label>
<input type="checkbox" name="userManage" value="UserM_VIEW_PERM"
id="UM_VIEW_PERM" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_VIEW_PERM'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap" colspan="4">
<label for="UM_DT_ROLE">
分配角色
</label>
<input type="checkbox" name="userManage" value="UserM_DT_ROLE"
id="UM_DT_ROLE" onclick="changeCheckUser()" <logic:iterate id="right" name="rights"> <c:if test="${right!='UserM_DT_ROLE'}">checked</c:if></logic:iterate>>
</td>
</tr>
<tr align="center">
<td height="20" colspan="10">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="2" bgcolor="#D5E4F4">
<tr>
<td></td>
</tr>
</table></td></tr>
<tr class="gray">
<td nowrap="nowrap" colspan="6">
<label for="rm_all">
<strong>角色管理</strong>
</label>
<input type="checkbox" name="roleManage" value="RoleM_ALL" onclick="changeAll(this);"
id="rm_all" <logic:iterate id="right" name="rights"> <c:if test="${right!='RoleM_ALL'}">checked</c:if></logic:iterate>>
</td>
</tr>
<tr align="left" class="gray">
<td nowrap="nowrap">
<label for="rm_add">
添加角色
</label>
<input type="checkbox" name="roleManage" value="RoleM_ADD"
id="rm_add" onclick="changeCheckRole()" <logic:iterate id="right" name="rights"> <c:if test="${right!='RoleM_ADD'}">checked</c:if></logic:iterate>s>
</td>
<td nowrap="nowrap">
<label for="rm_grant">
授权角色
</label>
<input type="checkbox" name="roleManage" value="RoleM_GRANT"
id="rm_grant" onclick="changeCheckRole()" <logic:iterate id="right" name="rights"> <c:if test="${right!='RoleM_GRANT'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="rm_update">
更新角色
</label>
<input type="checkbox" name="roleManage" value="RoleM_UPDATE"
id="rm_update" onclick="changeCheckRole()" <logic:iterate id="right" name="rights"> <c:if test="${right!='RoleM_UPDATE'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="rm_query">
查询角色
</label>
<input type="checkbox" name="roleManage" value="RoleM_QUERY"
id="rm_query" onclick="changeCheckRole()" <logic:iterate id="right" name="rights"> <c:if test="${right!='RoleM_QUERY'}">checked</c:if></logic:iterate>>
</td>
<td nowrap="nowrap">
<label for="rm_del">
删除角色
</label>
<input type="checkbox" name="roleManage" value="RoleM_DEL"
id="rm_del" onclick="changeCheckRole()" <logic:iterate id="right" name="rights"> <c:if test="${right!='RoleM_DEL'}">checked</c:if></logic:iterate>>
</td>
</tr>
<tr align="center">
<td height="20" colspan="10">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="2" bgcolor="#D5E4F4">
<tr>
<td></td>
</tr>
</table></td></tr>
<tr class="gray">
<td nowrap="nowrap" colspan="6">
<label for="cm_all">
<strong>客户管理</strong>
</label>
<input type="checkbox" name="customerManage" value="CustomerM_ALL" onclick="changeAll(this);"
id="cm_all" <logic:iterate id="right" name="rights"> <c:if test="${right!='CustomerM_ALL'}">checked</c:if></logic:iterate>>
</td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -