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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="com.redmoon.oa.person.*"%>
  3. <%@ page import="com.redmoon.oa.dept.*"%>
  4. <%@ page import="cn.js.fan.util.*"%>
  5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  6. <HTML><HEAD><TITLE>日程安排</TITLE>
  7. <META http-equiv=Content-Type content="text/html; charset=utf-8">
  8. <link rel="stylesheet" href="common.css" type="text/css">
  9. <%@ include file="inc/nocache.jsp" %>
  10. <META content="MSHTML 6.00.2600.0" name=GENERATOR>
  11. <script>
  12. function findObj(theObj, theDoc)
  13. {
  14.   var p, i, foundObj;
  15.   
  16.   if(!theDoc) theDoc = document;
  17.   if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
  18.   {
  19.     theDoc = parent.frames[theObj.substring(p+1)].document;
  20.     theObj = theObj.substring(0,p);
  21.   }
  22.   if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
  23.   for (i=0; !foundObj && i < theDoc.forms.length; i++) 
  24.     foundObj = theDoc.forms[i][theObj];
  25.   for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
  26.     foundObj = findObj(theObj,theDoc.layers[i].document);
  27.   if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
  28.   
  29.   return foundObj;
  30. }
  31. var GetDate=""; 
  32. function SelectDate(ObjName,FormatDate){
  33. var PostAtt = new Array;
  34. PostAtt[0]= FormatDate;
  35. PostAtt[1]= findObj(ObjName);
  36. GetDate = showModalDialog("util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:221px;status:no;help:no;");
  37. }
  38. function SetDate()
  39. findObj(ObjName).value = GetDate; 
  40. }
  41. function SelectDateTime(objName) {
  42. var dt = showModalDialog("util/calendar/time.htm", "" ,"dialogWidth:266px;dialogHeight:125px;status:no;help:no;");
  43. if (dt!=null)
  44. findObj(objName).value = dt;
  45. }
  46. function setPerson(deptCode, deptName, userName, userRealName)
  47. {
  48. form1.proxy.value = userName;
  49. form1.proxyUserRealName.value = userRealName;
  50. }
  51. </script>
  52. </HEAD>
  53. <BODY bgColor=#ffffff leftMargin=0 topMargin=3 marginheight="3" marginwidth="0">
  54. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  55. <%
  56. String priv="read";
  57. if (!privilege.isUserPrivValid(request, priv)) {
  58. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  59. return;
  60. }
  61. String userName = ParamUtil.get(request, "userName");
  62. if (userName.equals(""))
  63. userName = privilege.getUser(request);
  64. String op = ParamUtil.get(request, "op");
  65. UserMgr um = new UserMgr();
  66. if (op.equals("setProxy")) {
  67. boolean re = false;
  68. try {
  69. re = um.setProxy(request, userName);
  70. }
  71. catch (ErrMsgException e) {
  72. out.print(StrUtil.p_center(e.getMessage()));
  73. }
  74. if (re)
  75. out.print(StrUtil.Alert("设置代理成功!"));
  76. }
  77. UserDb ud = um.getUserDb(userName);
  78. String proxy = ud.getProxy();
  79. String proxyUserRealName = "";
  80. if (!proxy.equals("")) {
  81. proxyUserRealName = ud.getUserDb(proxy).getRealName();
  82. }
  83. %>
  84. <table width="494" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  85.   <tr> 
  86.     <td height="23" class="right-title">&nbsp;设置 <%=ud.getRealName()%> 代理职位</td>
  87.   </tr>
  88.   <tr> 
  89.     <td height="225" align="center" valign="top">
  90.       <table width="83%" border="0" cellspacing="0" cellpadding="5">
  91.    <form id=form1 name=form1 action="?op=setProxy" method="post">
  92.         <tr>
  93.           <td>代&nbsp;&nbsp;理&nbsp;&nbsp;人&nbsp;
  94.             <input name=proxyUserRealName value="<%=proxyUserRealName%>" readonly>
  95.           <a href="#" onClick="javascript:showModalDialog('user_sel.jsp',window.self,'dialogWidth:480px;dialogHeight:320px;status:no;help:no;')">选择用户</a>&nbsp;&nbsp;
  96.           <input name=proxy type=hidden value="<%=ud.getProxy()%>">
  97.           <input name="userName" type="hidden" value="<%=userName%>">
  98. <input type="button" onClick="form1.proxy.value='';form1.proxyUserRealName.value=''" value="清除">   
  99.   </td>
  100.         </tr>
  101.         <tr>
  102.           <td>开始时间
  103.           <input name=proxyBeginDate size=10 readonly value="<%=DateUtil.format(ud.getProxyBeginDate(), "yyyy-MM-dd")%>">
  104.           <img src="images/form/calendar.gif" width="26" height="26" align=absMiddle style="cursor:hand" onClick="SelectDate('proxyBeginDate','yyyy-mm-dd')">
  105.           <input style="WIDTH: 50px" value="<%=DateUtil.format(ud.getProxyBeginDate(), "HH:mm:ss")%>" name="proxyBeginTime" size="20">
  106. &nbsp;<img style="CURSOR: hand" onClick="SelectDateTime('proxyBeginTime')" src="images/form/clock.gif" align="absMiddle" width="18" height="18"></td>
  107.         </tr>
  108.         <tr>
  109.           <td align="left">结束时间
  110.             <input name=proxyEndDate size=10 readonly value="<%=DateUtil.format(ud.getProxyEndDate(), "yyyy-MM-dd")%>">
  111.             <img src="images/form/calendar.gif" width="26" height="26" align=absMiddle style="cursor:hand" onClick="SelectDate('proxyEndDate','yyyy-mm-dd')">
  112.             <input style="WIDTH: 50px" value="<%=DateUtil.format(ud.getProxyEndDate(), "HH:mm:ss")%>" name="proxyEndTime" size="20">
  113. &nbsp;<img style="CURSOR: hand" onClick="SelectDateTime('proxyEndTime')" src="images/form/clock.gif" align="absMiddle" width="18" height="18"></td>
  114.         </tr>
  115.         <tr>
  116.           <td align="center"><label>
  117.             <input name="isUseMsg" type="checkbox" value="true" checked>短消息通知&nbsp;&nbsp;
  118.             <input type="submit" name="Submit" value="设   置">
  119.           &nbsp;&nbsp;&nbsp;</label></td>
  120.         </tr>
  121.         <tr>
  122.           <td align="center">注意:将代理人设置为空将清除代理</td>
  123.         </tr>
  124. </form>
  125.       </table>
  126.       <p><br>
  127.       </p></td>
  128.   </tr>
  129. </table>
  130. <div align="center"></div>
  131. </BODY>
  132. </HTML>