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

📄 role_auth.jsp

📁 struts+hibernate开发的一个系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="java.util.*"%>
<%@ page import="org.appfuse.model.*"%>
<%@ page import="org.appfuse.webapp.form.*"%>
<%@ page import="org.appfuse.util.*"%>
<%@ page import="org.appfuse.*"%>
<%@ 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"%>
<SCRIPT language=JavaScript src="<%=request.getContextPath()%>/include/check.js" type="text/javascript"></SCRIPT>
<html>
  <head>
  <link rel=stylesheet href="<%=request.getContextPath()%>/include/style.css">
  <title>权限管理</title>
  <SCRIPT language="javascript">
     function removeRoleAuth(moduleid, roleid, functionid)
     {
	document.moduleForm.action="<%=request.getContextPath()%>/roleAuthAction.do?method=removeroleauth&moduleid=" + moduleid + "&roleid="+ roleid + "&functionid=" + functionid;
        document.moduleForm.submit();
     }
     function createRoleAuth(moduleid, roleid, functionid)
     {
	document.moduleForm.action="<%=request.getContextPath()%>/roleAuthAction.do?method=createroleauth&moduleid=" + moduleid + "&roleid="+ roleid + "&functionid=" + functionid;
        document.moduleForm.submit();
     }
  </SCRIPT>
  </head>
<%
   List modules = (List)request.getAttribute("modules");
   Role role = (Role)request.getAttribute("role");
%>

<body>
<form name="moduleForm" method="POST" >
<table border="1px" cellspacing="0" cellpadding="10" align=center width="80%" bgColor=#E4E8EF>
  <tr>
    <td width="50%">[角色名称]:<%=role.getRolename()%> [角色描述]:<%=role.getDescription()%>
    </td>
    <td width="50%" align="center">
	<a href="<%=request.getContextPath()%>/roleAction.do?method=list">返回</a>
    </td>
  </tr>
</table>
<table border="1px" cellspacing="0" cellpadding="10" align=center width="80%" bgColor=#E4E8EF>
  <tr bgcolor="#76aef0">
<!--
    <th width="10%"><div align="center">模块编号</div></th>
-->
    <th width="20%"><div align="center">模块名称</div></th>
    <th width="30%"><div align="center">模块地址</div></th>
    <th width="50%"><div align="center">分配操作权限</div></th>
  </tr>
  <%
  if(modules != null)
  {
     for(int i = 0; i< modules.size(); i++)
     {
        ModuleEx module = (ModuleEx)modules.get(i);
  %>
  <tr>
<!--
    <td><%=StringUtil.getString(module.getModuleid())%></td>
-->
    <td><%=module.getModulename()%></td>
    <td><%=module.getModuleURL()%></td>
    <td align="center">
        <%
           List functions = module.getFunctions();
           for(int j = 0; j < functions.size(); j++){
               FunctionEx function = (FunctionEx)functions.get(j);
               if(function.isIsExist()){
        %>
        <input type=checkbox  onclick="removeRoleAuth(<%=module.getModuleid()%>, <%=role.getRoleid()%>, <%=function.getFunctionid()%>);" checked><%=function.getDescription()%>
         <%} else {%>
        <input type=checkbox  onclick="createRoleAuth(<%=module.getModuleid()%>, <%=role.getRoleid()%>, <%=function.getFunctionid()%>);"><%=function.getDescription()%>
         <%} }%>

    </td>
  </tr>
  <%
      }
   }
  %>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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