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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import = "com.redmoon.oa.worklog.*"%>
  3. <%@ page import = "cn.js.fan.util.*"%>
  4. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  5. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  10. <title>修改工作记录</title>
  11. <link href="common.css" rel="stylesheet" type="text/css">
  12. <%@ include file="inc/nocache.jsp"%>
  13. <script language="JavaScript" type="text/JavaScript">
  14. <!--
  15. function MM_preloadImages() { //v3.0
  16.   var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  17.     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
  18.     if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
  19. }
  20. //-->
  21. </script>
  22. <script language=javascript>
  23. <!--
  24. function openWin(url,width,height)
  25. {
  26.   var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=50,left=120,width="+width+",height="+height);
  27. }
  28. //-->
  29. </script>
  30. </head>
  31. <body background="" leftmargin="0" topmargin="3" marginwidth="0" marginheight="0">
  32. <%
  33. String userName = ParamUtil.get(request, "userName");
  34. %>
  35. <table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableframe">
  36.   <tr>
  37.     <td width="100%" height="23" class="right-title"> 修改工作记事&nbsp;&nbsp;<a href="mywork.jsp?userName=<%=StrUtil.UrlEncode(userName)%>">本月</a>&nbsp;&nbsp;<a href="mywork_list.jsp?userName=<%=StrUtil.UrlEncode(userName)%>">全部</a></td>
  38.   </tr>
  39.   <tr>
  40.     <td valign="top">
  41.       <%
  42. String priv="read";
  43. if (!privilege.isUserPrivValid(request,priv))
  44. {
  45. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  46. return;
  47. }
  48. int id = ParamUtil.getInt(request, "id");
  49. String content="",mydate="";
  50. String sql = "";
  51. WorkLogMgr wlm = new WorkLogMgr();
  52. String op = request.getParameter("op");
  53. if (op!=null)
  54. {
  55. boolean re = false;
  56. try {
  57. re = wlm.modify(request);
  58. }
  59. catch (ErrMsgException e) {
  60. out.print(StrUtil.Alert(e.getMessage()));
  61. }
  62. if (re)
  63. out.print(StrUtil.Alert("操作成功!"));
  64. }
  65. WorkLogDb wld = wlm.getWorkLogDb(request, id);
  66. if (wld!=null && wld.isLoaded()) {
  67. content = wld.getContent();
  68. mydate = DateUtil.format(wld.getMyDate(), "yyyy-MM-dd HH:mm:ss");
  69. }
  70. %>
  71.       <br>
  72.       <table width="83%" border="0" align="center" cellpadding="0" cellspacing="0" class="stable">
  73.         <tr bgcolor="#C4DAFF"> 
  74.           <td height="21" colspan="2" align="center" bgcolor="#C4DAFF" class="stable"><%=mydate%></td>
  75.         </tr>
  76.         <form name="form1" action="?op=edit" method="post" onSubmit="">
  77.           <tr bgcolor="#EEEEEE"> 
  78.             <td width="51" height="17" align="center" class="stable">内 容<input type=hidden name="id" value="<%=id%>"></td>
  79.             <td width="357" height="17" class="stable"> <textarea name=content cols="60" class="singleboarder" rows="15"><%=content%></textarea>            </td>
  80.           </tr>
  81.           <tr bgcolor="#EEEEEE"> 
  82.             <td height="28" colspan="2" align="center" class="stable"> <input name="submit" type=submit value="发送"> 
  83.             &nbsp;&nbsp;&nbsp; <input name="reset" type=reset value="取消">            </td>
  84.           </tr>
  85.         </form>
  86.       </table>    
  87.       <br></td>
  88.   </tr>
  89. </table>
  90. </body>
  91. </html>