EditRole.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:5k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intRoleID = m_request.GetInt("ID");
  7. if(intRoleID<1)
  8. {
  9. %>
  10. <script language="JavaScript" type="text/JavaScript">
  11. alert("请选择正确的角色,修改失败!");
  12. history.back();
  13. </script>
  14. <%
  15. }
  16. else
  17. {
  18. Vector vt = RoleManager.getAllRecord();
  19. %>
  20. <html>
  21. <head>
  22. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  23. <title>角色管理-- GForce OA 2.0</title>
  24. <link href="../css/txt.jsp" rel="stylesheet" type="text/css"><script language="JavaScript" src="/js/changestyle.js"></script>
  25. <script language="JavaScript" type="text/javascript">
  26. function checkeditrole()
  27. {
  28.     if(document.editrole.RoleName.value=='')
  29.     {
  30.         alert("请输入角色名称!");
  31.         document.editrole.RoleName.focus();
  32.         return false;
  33.     }
  34. }
  35. </script>
  36. </head>
  37. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  38. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  39.     <tr>
  40.         <td align="center" valign="top"><p>&nbsp;</p>
  41.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  42.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  43.                     <th width="6%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  44.                     <th width="8%" nowrap><font color="#000000">序号</font></th>
  45.                     <th width="55%" nowrap><font color="#000000">角色名称</font></th>
  46.                     <th width="11%" nowrap><font color="#000000">添加</font></th>
  47.                     <th width="11%" nowrap><font color="#000000">修改</font></th>
  48.                     <th width="12%" nowrap><font color="#000000">删除</font></th>
  49.                 </tr>
  50.                 <%
  51. for(int i=0;i<vt.size();i++)
  52. {
  53.     String strID = ((Vector)vt.get(i)).get(0).toString();
  54.     if(!strID.equals((intRoleID + "")))
  55.     {
  56.         if(i % 2 == 0)
  57.             out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  58.         else
  59.             out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  60.         out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  61.         out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  62.         out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
  63.         out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  64.         out.println("<td align="center" valign="middle" nowrap><a href="EditRole.jsp?ID=" + strID + "">修改</a></td>");
  65.         out.println("<td align="center" valign="middle" nowrap><a href="DelRole.jsp?ID=" + strID + "" onclick="return confirm('您确实要删除该角色吗?\n删除该角色之前必须删除该角色的所用户和该角色的所有相关权限,\n否则会出错,您是否继续?');">删除</a></td>");
  66.         out.println("</tr>");
  67.     }
  68.     else
  69.     {
  70. %>
  71.                 <form name="editrole" action="EditRoleAction.jsp" method="post" onSubmit="javascript:return checkeditrole();">
  72.                     <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  73.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  74.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>"><%=(i+1)+""%><input type="hidden" name="ID" value="<%=strID%>"></th>
  75.                         <th align="left" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  76.                             <input name="RoleName" type="text" maxlength="20" Value="<%=((Vector)vt.get(i)).get(1).toString()%>"></th>
  77.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  78.                             <input type="button" value="返回" onclick="location='RoleManage.jsp'"></th>
  79.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><input type="submit" value="修改"></th>
  80.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><a href="DelRole.jsp?ID=<%=strID%>" onclick="return confirm('您确实要删除该角色吗?n删除该角色之前必须删除该角色的所用户和该角色的所有相关权限,n否则会出错,您是否继续?');">删除</a></th>
  81.                     </tr>
  82.                 </form>
  83. <%
  84.     }
  85. }
  86. %>
  87.             </table>
  88.         </td>
  89.     </tr>
  90. </table>
  91. </body>
  92. </html>
  93. <%
  94. }
  95. %>