EditRole.jsp~54~
资源名称:shihua.rar [点击查看]
上传用户:zghglow
上传日期:2022-08-09
资源大小:27227k
文件大小:6k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
JavaScript
- <%@ page contentType="text/html; charset=GBK" %>
- <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
- <html>
- <head>
- <title>EditRole</title>
- <script type="text/javascript">
- function OpenCheckBox(){
- <c:if test="${role != null}">
- var fmodel = '<c:out value="${role.rol_FModel}" />';
- var fmodels = fmodel.split(",");
- var cmodel = '<c:out value="${role.rol_CModel}" />';
- var cmodels = cmodel.split(",");
- var menu = '<c:out value="${role.rol_Menu}" />';
- var menus = menu.split(",");
- for(var i=0;i<fmodels.length;i++){
- document.getElementById("che_" + fmodels[i]).checked = true;
- document.getElementById("div_" + fmodels[i]).style.display = "";
- }
- for(var j=0;j<cmodels.length;j++){
- document.getElementById("che_" + cmodels[j]).checked = true;
- }
- for(var z=0;z<menus.length;z++){
- document.getElementById("che" + menus[z]).checked = true;
- }
- </c:if>
- }
- function ShowDiv(name){
- if(document.getElementById("che_" + name).checked == true){
- document.getElementById("div_" + name).style.display = "";
- }else{
- document.getElementById("div_" + name).style.display = "none";
- }
- }
- window.onload = OpenCheckBox;
- </script>
- <link href="<%=request.getContextPath() %>/Manage/Css/skinv2.0.css" rel="stylesheet" type="text/css" />
- </head>
- <body bgcolor="#ffffff">
- <form method="post" action="<%=request.getContextPath() %>/Manage/Role.do?todo=EditRole" enctype="multipart/form-data">
- <table cellspacing="0" cellpadding="0" width="100%" border="0">
- <tr bgcolor="#cfdbe8">
- <td style="WIDTH: 20px" width="20" bgcolor="#cfdbe8" height="19"> <img height="10" src="<%=request.getContextPath() %>/Manage/images/icon.gif" width="12" alt="" /></td>
- <td valign="middle" bgcolor="#cfdbe8" colspan="2"> 角色管理</td>
- </tr>
- <tr>
- <td style="HEIGHT: 31px" valign="top" align="left" height="80"> </td>
- <td style="HEIGHT: 31px" valign="middle" align="left" colspan="2">
- <img src="<%=request.getContextPath() %>/Manage/images/edit.gif" align="middle" alt="" /> 添加角色
- </td>
- </tr>
- <tr>
- <td style="HEIGHT: 1px" valign="top" align="left"></td>
- <td style="HEIGHT: 1px" valign="top" align="left" width="820" bgcolor="#cfdbe8"></td>
- <td style="HEIGHT: 1px; width: 144px;" valign="top" align="left"></td>
- </tr>
- <tr>
- <td style="HEIGHT: 381px" valign="top" align="left"></td>
- <td style="HEIGHT: 381px" valign="top" align="left" colspan="2">
- <br/>
- <table align="left" bgcolor="#cccccc" border="0" cellpadding="1" cellspacing="1" width="98%">
- <tr bgcolor="#ffffff">
- <td style="height: 25px; width: 117px;">
- 角色名:
- </td>
- <td style="height: 23px">
- <input type="text" id="txtTitle" name="name" value='<c:out value="${role.rol_Name}" />' />
- <input type="hidden" id="hidID" name="id" value='<c:out value="${role.rol_ID}" />' />
- </td>
- </tr>
- <tr bgcolor="#ffffff">
- <td style="height: 25px; width: 117px;">
- 权限授予:
- </td>
- <td style="height: 23px; padding:8px;">
- <c:forEach var="fmodel" items="${ModelList}" varStatus="status">
- <input id="che_<c:out value="${fmodel.mod_Key}" />" type="checkbox" name='fmodel' value='<c:out value="${fmodel.mod_Key}" />' onclick='ShowDiv("<c:out value="${fmodel.mod_Key}" />")' />
- <strong><c:out value="${fmodel.mod_CnName}" /></strong>
- <div id='div_<c:out value="${fmodel.mod_Key}" />' style="border:solid 1px #CCCCCC; padding:5px 22px;width:500px; margin-top:4px;display:none;">
- <c:forEach var="cmodel" items="${fmodel.childModel}" varStatus="status">
- <div style="float:left; width:150px;display: block;">
- <input id='che_<c:out value="${cmodel.mod_Key}" />' type="checkbox" name='<c:out value="${fmodel.mod_Key}" />' value='<c:out value="${cmodel.mod_Key}" />' />
- <c:out value="${cmodel.mod_CnName}" />
- </div>
- </c:forEach>
- </div><br />
- </c:forEach>
- <br />
- 详细菜单项
- <div style="border:solid 1px #CCCCCC; padding:5px 22px;width:500px; margin-top:4px;">
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='QYXX' id="cheQYXX" />企业信息
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='QYWH' id="cheQYWH" />企业文化
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='XWGG' id="cheXWGG" />新闻公告
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='GDTD' id="cheGDTD" />股东天地
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='SCJY' id="cheSCJY" />生产经营
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='LLZY' id="cheLLZY" />人力资源
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='WZDT' id="cheWZDT" />网站地图
- </div>
- <div style="float:left; width:150px;display: block;">
- <input type="checkbox" name='menus' value='WZDT' id="cheWZDT" />栏目列表
- </div>
- </div>
- </td>
- </tr>
- <tr bgcolor="#ffffff" align="center">
- <td colspan="2">
- <input type="submit" id="btnSave" value="保 存" onclick="" />
- <input type="submit" value="返 回" />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>