user_role_op.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=utf-8"%>
  2. <%@ page import="com.redmoon.oa.pvg.*"%>
  3. <%@ page import="com.redmoon.oa.person.*"%>
  4. <%@ page import="cn.js.fan.util.*"%>
  5. <%@ page import="cn.js.fan.db.*"%>
  6. <%@ page import="cn.js.fan.web.*"%>
  7. <html>
  8. <head>
  9. <title>管理登录</title>
  10. <link href="../common.css" rel="stylesheet" type="text/css">
  11. <link href="default.css" rel="stylesheet" type="text/css">
  12. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  13. <style type="text/css">
  14. <!--
  15. .style4 {
  16. color: #FFFFFF;
  17. font-weight: bold;
  18. }
  19. -->
  20. </style>
  21. </head>
  22. <body bgcolor="#FFFFFF" text="#000000">
  23. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  24. <%
  25. if (!privilege.isUserPrivValid(request, "admin.role")) {
  26. out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  27. return;
  28. }
  29. %>
  30. <%
  31. String op = ParamUtil.get(request, "op");
  32. RoleDb rd = new RoleDb();
  33. boolean isEdit = false;
  34. if (op.equals("edit")) {
  35. isEdit = true;
  36. String code = ParamUtil.get(request, "code");
  37. if (code.equals("")) {
  38. StrUtil.Alert_Back("编码不能为空!");
  39. return;
  40. }
  41. rd = rd.getRoleDb(code);
  42. }
  43. if (op.equals("editdo")) {
  44. isEdit = true;
  45. RoleMgr roleMgr = new RoleMgr();
  46. try {
  47. if (roleMgr.update(request))
  48. out.print(StrUtil.Alert("修改成功!"));
  49. }
  50. catch (ErrMsgException e) {
  51. out.print(StrUtil.Alert_Back(e.getMessage()));
  52. }
  53. String code = ParamUtil.get(request, "code");
  54. if (code.equals("")) {
  55. StrUtil.Alert_Back("编码不能为空!");
  56. return;
  57. }
  58. rd = roleMgr.getRoleDb(code);
  59. }
  60. %>
  61. <table cellSpacing="0" cellPadding="0" width="100%">
  62.   <tbody>
  63.     <tr>
  64.       <td class="head">管理角色&nbsp;&nbsp;(<a href="user_role_m.jsp">列表</a>)</td>
  65.     </tr>
  66.   </tbody>
  67. </table>
  68. <br>
  69. <TABLE 
  70. style="BORDER-RIGHT: #a6a398 1px solid; BORDER-TOP: #a6a398 1px solid; BORDER-LEFT: #a6a398 1px solid; BORDER-BOTTOM: #a6a398 1px solid" 
  71. cellSpacing=0 cellPadding=3 width="95%" align=center>
  72.   <!-- Table Head Start-->
  73.   <TBODY>
  74.     <TR>
  75.       <TD class=thead style="PADDING-LEFT: 10px" noWrap width="70%">
  76.   <%if (isEdit) {%>
  77.      修改角色
  78.       <%}else{%>
  79.   添加角色
  80.       <%}%>
  81.   </TD>
  82.     </TR>
  83.     <TR class=row style="BACKGROUND-COLOR: #fafafa">
  84.       <TD height="175" align="center" style="PADDING-LEFT: 10px"><table class="frame_gray" width="53%" border="0" cellpadding="0" cellspacing="1">
  85.           <tr>
  86.             <td align="center"><table width="65%" border="0" cellpadding="0" cellspacing="0">
  87.                 <form name="form1" method="post" action="<%=isEdit?"user_role_op.jsp?op=editdo":"user_role_m.jsp?op=add"%>">
  88.                   <tr>
  89.                     <td width="100" height="31" align="center">编码</td>
  90.                   <td align="left"><input name="code" value="<%=isEdit?rd.getCode():RandomSecquenceCreator.getId(20)%>" <%=isEdit?"readonly":""%>></td>
  91.                   </tr>
  92.                   <tr>
  93.                     <td height="32" align="center">描述</td>
  94.                   <td align="left"><input name="desc" value="<%=isEdit?rd.getDesc():""%>"></td>
  95.                   </tr>
  96.                   <tr>
  97.                     <td height="32" align="center">顺序</td>
  98.                     <td align="left"><input name="orders" value="<%=isEdit?""+rd.getOrders():""%>"></td>
  99.                   </tr>
  100.                   <tr>
  101.                     <td colspan="2" align="center">                    </td>
  102.                   </tr>
  103.                   <tr>
  104.                     <td height="43" colspan="2" align="center"><input name="Submit" type="submit" class="singleboarder" value="提交">
  105. &nbsp;&nbsp;&nbsp;
  106.                       <input name="Submit" type="reset" class="singleboarder" value="重置"></td>
  107.                   </tr>
  108.                 </form>
  109.             </table></td>
  110.           </tr>
  111.       </table></TD>
  112.     </TR>
  113.     <!-- Table Body End -->
  114.     <!-- Table Foot -->
  115.     <TR>
  116.       <TD class=tfoot align=right><DIV align=right> </DIV></TD>
  117.     </TR>
  118.     <!-- Table Foot -->
  119.   </TBODY>
  120. </TABLE>
  121. <br>
  122. <br>
  123. </body>
  124. <script language="javascript">
  125. <!--
  126. function form1_onsubmit()
  127. {
  128. }
  129. //-->
  130. </script>
  131. </html>