📄 level_main.jsp
字号:
<%--
模块名称:系统管理
模块功能:权限管理
版 本:V1.0
著 作 人:蔡静
著作日期:2001-10-29
该模块所需的文件:
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
修改日期:
修 改 人:
修改理由:
修改出处:
= = = = = = = = = = = = = = = = = = = = = = = = = =
--%>
<%@ page contentType= "text/html; charset=gb2312" %>
<%@ page language="java" import="java.sql.*" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<%
String str = request.getParameter("save");
if (str != null) {
String employee_id = request.getParameter("employee");
String[] role_id = new String[10];
String sql = null;
sql = "delete from t_role where employee_id = '" + employee_id + "'";
db.executeUpdate(sql);
for (int i=0; i<10; i++)
role_id[i] = request.getParameter("r"+i);
for (int i=0; i<10; i++) {
if (role_id[i] != null) {
sql = "insert into t_role(employee_id, role_id ) values('";
sql = sql + employee_id + "','" + role_id[i] + "')";
db.executeUpdate(sql);
}
}
}
%>
<html>
<head>
<%@ include file="../inc/config.jsp" %>
<title>员工角色管理</title>
<script language="JavaScript">
function listUser() {
dept_id = document.form1.dept.value;
window.open("level_hide.jsp?dept_id="+dept_id,"level_hide");
}
function listCheck() {
employee_id = document.form1.employee.value;
window.open("level_hide1.jsp?employee_id="+employee_id,"level_hide1");
}
function checkForm() {
if (document.form1.employee.value == "all") {
alert("请选择一个员工!");
return false;
}
var flag = 0;
for (i=0; i<10; i++) {
role = eval("document.form1.r" + i);
if (role.checked)
flag = 1;
}
return true;
}
</script>
</head>
<body class=page onLoad="listUser()">
<table width="98%" align="center" cellspacing="0" border="0" cellpadding="0">
<tr>
<td> </td>
<td align="center" width="108" height="30" background="../images/title_bg.gif">
<script language=JavaScript>
document.write("<span class=\"title\">"+document.title+"</span>");
</script>
</td>
</tr>
</table>
<table width="98%" background="../images/line.gif" border="0" cellspacing="0" cellpadding="0" height="12" align="center">
<tr>
<td> </td>
</tr>
</table>
<form name="form1" method="post" action="level_main.jsp">
<table width="70%" cellspacing="1" cellpadding="10" height="25" align="center" border="0" class="table_bg">
<tr>
<td class="title_bg" width="11%" align="right">隶属部门:</td>
<td class="tr_bg1" width="41%" >
<select name="dept" onChange="listUser()" class="select">
<option value="all">所有部门</option>
<%
String sql = "select dept_id, dept_name from t_dept where dept_id <> 'root'";
String dept_id, dept_name;
ResultSet rs = db.executeQuery(sql);
while (rs.next()) {
dept_id = rs.getString("dept_id");
dept_name = rs.getString("dept_name");
%>
<option value=<%=dept_id%>><%=dept_name%></option>
<%}%>
</select>
</td>
</tr>
<tr>
<td class="title_bg" width="11%" align="right">员工姓名:</td>
<td class="tr_bg1" width="41%" >
<select name="employee" onChange="listCheck()" class="select">
<option value="all">所有人员</option>
</select>
</td>
</tr>
<tr >
<td class="title_bg" width="11%" align="right"> 对应角色:</td>
<td class="tr_bg1" width="41%" align="center">
<table width="100%" border="0">
<tr>
<td>
<input type="checkbox" name="r0" value="zr_role">
主任</td>
<td>
<input type="checkbox" name="r1" value="ls_role">
律师</td>
<td>
<input type="checkbox" name="r2" value="zrzl_role">
主任助理</td>
</tr>
<tr>
<td>
<input type="checkbox" name="r3" value="lszl_role">
律师助理</td>
<td>
<input type="checkbox" name="r4" value="cw_role">
财务</td>
<td>
<input type="checkbox" name="r5" value="rs_role">
人事</td>
</tr>
<tr>
<td>
<input type="checkbox" name="r6" value="bgs_role">
办公室</td>
<td>
<input type="checkbox" name="r7" value="dagl_role">
档案管理员</td>
<td>
<input type="checkbox" name="r8" value="xtgl_role">
系统管理员</td>
</tr>
<tr>
<td>
<input type="checkbox" name="r9" value="ywzb_role">
业务主办</td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center">
<input type="submit" value="保 存" name="save" class="button" onClick="return checkForm()">
<input type="reset" value="取 消" name="cancel" class="button">
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -