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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8" %>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="com.redmoon.oa.dept.*"%>
  4. <%@ page import="com.redmoon.oa.person.*"%>
  5. <%@ page import="com.redmoon.oa.pvg.Privilege"%>
  6. <%@ page import="com.redmoon.oa.archive.*"%>
  7. <%@ page import="java.util.*"%>
  8. <HTML><HEAD><TITLE>管理查询操作人</TITLE>
  9. <link rel="stylesheet" href="../common.css">
  10. <script language="JavaScript">
  11. function findObj(theObj, theDoc)
  12. {
  13.   var p, i, foundObj;
  14.   
  15.   if(!theDoc) theDoc = document;
  16.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  17.   {
  18.     theDoc = parent.frames[theObj.substring(p+1)].document;
  19.     theObj = theObj.substring(0,p);
  20.   }
  21.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  22.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  23.     foundObj = theDoc.forms[i][theObj];
  24.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  25.     foundObj = findObj(theObj,theDoc.layers[i].document);
  26.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  27.   
  28.   return foundObj;
  29. }
  30. var selUserNames = "";
  31. var selUserRealNames = "";
  32. function getSelUserNames() {
  33. return selUserNames;
  34. }
  35. function getSelUserRealNames() {
  36. return selUserRealNames;
  37. }
  38. var doWhat = "";
  39. function openWinUsers() {
  40. doWhat = "users";
  41. selUserNames = form1.users.value;
  42. selUserRealNames = form1.userRealNames.value;
  43. showModalDialog('../user_multi_sel.jsp',window.self,'dialogWidth:520px;dialogHeight:400px;status:no;help:no;')
  44. }
  45. function setUsers(users, userRealNames) {
  46. if (doWhat=="users") {
  47. form1.users.value = users;
  48. form1.userRealNames.value = userRealNames;
  49. }
  50. if (doWhat=="principal") {
  51. form1.principal.value = users;
  52. form1.principalRealNames.value = userRealNames;
  53. }
  54. }
  55. function openWinPrincipal() {
  56. doWhat = "principal";
  57. selUserNames = form1.principal.value;
  58. selUserRealNames = form1.principalRealNames.value;
  59. showModalDialog('../user_multi_sel.jsp',window.self,'dialogWidth:520px;dialogHeight:400px;status:no;help:no;')
  60. }
  61. </script>
  62. <META content="Microsoft FrontPage 4.0" name=GENERATOR><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  63. </HEAD>
  64. <BODY bgColor=#FBFAF0 leftMargin=4 topMargin=8 rightMargin=0 class=menubar>
  65. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  66. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  67. <% 
  68. String userRealNames = "",users = "";
  69. int id = ParamUtil.getInt(request, "id");
  70. String sql = ArchiveSQLBuilder.getUserPrivilege(id);
  71. ArchivePrivilegeDb apd = new ArchivePrivilegeDb();
  72. Vector vt = apd.list(sql);
  73. Iterator ir = null;
  74. ir = vt.iterator();
  75. while (ir != null && ir.hasNext()) {
  76. apd = (ArchivePrivilegeDb) ir.next();
  77. if (users.equals("")) {
  78. users = apd.getUserName();
  79. UserDb ud = new UserDb();
  80. ud = ud.getUserDb(apd.getUserName());
  81. userRealNames = ud.getRealName();
  82. }
  83. else {
  84. users += "," + apd.getUserName();
  85. UserDb ud = new UserDb();
  86. ud = ud.getUserDb(apd.getUserName());
  87. userRealNames += "," + ud.getRealName();
  88. }
  89. }
  90.   
  91. %>
  92. <table width="426" border="0" align="center" cellpadding="0" cellspacing="1" class="tableframe">
  93. <form action="archive_query_do.jsp?op=modifyUsers" name="form1" method="post">
  94.   <tr>
  95.     <td colspan="3" align="center" class="right-title">管理查询操作人</td>
  96.     </tr>
  97.   <tr>
  98.     <td width="47">&nbsp;</td>
  99.     <td width="317"> <span class="TableData">
  100.       <input name="users" id="users" type="hidden" value="<%=users%>">
  101.       <textarea name="userRealNames" cols="45" rows="3" readOnly wrap="yes" id="userRealNames"><%=userRealNames%></textarea>&nbsp;</span> 
  102.     </td>
  103.     <td width="488" align="left"><span class="TableData">
  104.         <input class="SmallButton" title="添加收件人" onClick="openWinUsers()" type="button" value="添 加" name="button">
  105.         &nbsp;
  106.         <input class="SmallButton" title="清空收件人" onClick="form1.users.value='';form1.userRealNames.value=''" type="button" value="清 空" name="button"></span> </td>
  107.   </tr>
  108.   
  109.   <tr>
  110.     <td>&nbsp;</td>
  111.     <td align="center"><input type="submit" value="确 定">
  112.       &nbsp;&nbsp;&nbsp;&nbsp;
  113.       <input type="hidden" name="id" value="<%=id%>">      &nbsp; </td>
  114.     <td align="center">&nbsp;</td>
  115.   </tr>
  116.   </form>
  117. </table>
  118. </BODY></HTML>