plan_edit.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 = "cn.js.fan.util.*"%>
  4. <html>
  5. <head>
  6. <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. <script language=javascript>
  10. <!--
  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. function openWin(url,width,height)
  31. {
  32.   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);
  33. }
  34. function setFilePriv(op)
  35. {
  36. openWin("setfilepriv.jsp?op="+op,400,300);
  37. }
  38. var GetDate=""; 
  39. function SelectDate(ObjName,FormatDate){
  40. var PostAtt = new Array;
  41. PostAtt[0]= FormatDate;
  42. PostAtt[1]= findObj(ObjName);
  43. GetDate = showModalDialog("util/calendar/calendar.htm", PostAtt ,"dialogWidth:286px;dialogHeight:195px;status:no;help:no;");
  44. }
  45. function SetDate()
  46. findObj(ObjName).value = GetDate; 
  47. }
  48. function SelectDateTime(objName) {
  49. var dt = showModalDialog("util/calendar/time.htm", "" ,"dialogWidth:266px;dialogHeight:125px;status:no;help:no;");
  50. if (dt!=null)
  51. findObj(objName).value = dt;
  52. }
  53. //-->
  54. </script>
  55. </head>
  56. <body bgcolor="#FFFFFF" text="#000000" topmargin="5">
  57. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  58. <%@ include file="inc/inc.jsp"%>
  59. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  60. <%
  61. String priv="read";
  62. if (!privilege.isUserPrivValid(request,priv))
  63. {
  64. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  65. return;
  66. }
  67. int id = ParamUtil.getInt(request, "id");
  68. PlanDb pd = new PlanDb();
  69. pd = pd.getPlanDb(id);
  70. String title="",content="";
  71. Calendar mydate = Calendar.getInstance();
  72. int year=0,month=0,day=0,hour=0,minute=0,sec=0;
  73. String strmonth="01";
  74. title = pd.getTitle();
  75. content = pd.getContent();
  76. mydate.setTime(pd.getMyDate());
  77. year = mydate.get(mydate.YEAR);
  78. month = mydate.get(mydate.MONTH)+1;
  79. if (month<10)
  80. strmonth = "0"+month;
  81. else
  82. strmonth = ""+month;
  83. day = mydate.get(mydate.DAY_OF_MONTH);
  84. hour = mydate.get(mydate.HOUR_OF_DAY);
  85. minute = mydate.get(mydate.MINUTE);
  86. sec = mydate.get(mydate.SECOND);
  87. %>
  88. <%@ include file="plan_inc_menu_top.jsp"%>
  89. <br>
  90. <table width="494" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableframe">
  91.   <tr bgcolor="#0099FF"> 
  92.     <td height="21" colspan="3" align="left" bgcolor="#0099FF" class="right-title"><b><font color="#FFFFFF">&nbsp;修改日程</font></b></td>
  93.   </tr>
  94.   <form name="form1" action="plan_edit_do.jsp" method="post" onSubmit="">
  95.     <tr> 
  96.       <td height="19" align="center">标&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题</td>
  97.       <td height="19">&nbsp;</td>
  98.       <td height="19"><input name="title" class="singleboarder" size=35 value="<%=title%>">
  99.   <input type=hidden value=<%=id%> name=id>   </td>
  100.     </tr>
  101.     <tr> 
  102.       <td width="13%" height="19" align="center">待办日期 </td>
  103.       <td width="0%" height="19">&nbsp;</td>
  104.       <td width="87%" height="19">
  105. <input name=mydate size="10">
  106.         <img style="CURSOR: hand" onClick="SelectDate('mydate','yyyy-mm-dd')" src="images/form/calendar.gif" align="absMiddle" width="26" height="26">
  107.         <input style="WIDTH: 50px" value="12:30:30" name="time" size="20">
  108.       &nbsp;<img style="CURSOR: hand" onClick="SelectDateTime('time')" src="images/form/clock.gif" align="absMiddle" width="18" height="18"> </td>
  109.   <script language="JavaScript">
  110.   <!--
  111.   form1.mydate.value = "<%=DateUtil.format(mydate, "yyyy-MM-dd")%>";
  112.   form1.time.value = "<%=DateUtil.format(mydate, "HH:mm:ss")%>";
  113.   //-->
  114.   </script>
  115.     </tr>
  116.     <tr>
  117.       <td height="17" align="center">是否提醒</td>
  118.       <td height="17">&nbsp;</td>
  119.       <td height="17"><input type="checkbox" name="isRemind" value="1" <%=pd.isRemind()?"checked":""%>>
  120.   &nbsp;&nbsp;
  121.   <select name="before">
  122.     <option value="10">十分钟</option>
  123.     <option value="20">二十分钟</option>
  124.     <option value="30">三十分钟</option>
  125.     <option value="45">四十五分钟</option>
  126.     <option value="60">一小时</option>
  127.     <option value="120">二小时</option>
  128.     <option value="180">三小时</option>
  129.     <option value="360">六小时</option>
  130.     <option value="720">十二小时</option>
  131.   </select>
  132.   <%
  133.   int m = 10;
  134.   java.util.Date rd = pd.getRemindDate();
  135.   if (rd!=null) {
  136.   m = DateUtil.datediffMinute(pd.getMyDate(), rd);
  137.   }
  138.   %>
  139.   <script>
  140.   form1.before.value = "<%=m%>";
  141.   </script>
  142.   
  143.         之前 
  144.         <%
  145. if (com.redmoon.oa.sms.SMSFactory.isUseSMS()) {
  146. %>
  147.         <input name="isToMobile" value="true" type="checkbox"  <%=pd.isRemindBySMS()?"checked":""%>/>
  148. 短讯提醒
  149. <%}%></td>
  150.     </tr>
  151.     <tr> 
  152.       <td width="13%" height="17" align="center">内&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;容</td>
  153.       <td width="0%" height="17">&nbsp;</td>
  154.       <td width="87%" height="17"> <textarea name=content cols="50" class="singleboarder" rows="8"><%=content%></textarea>      </td>
  155.     </tr>
  156.     <tr> 
  157.       <td colspan="3" align="center">&nbsp; </td>
  158.     </tr>
  159.     <tr> 
  160.       <td colspan="3" align="center"> <input name="submit" type=submit class="singleboarder" value=" 发 送 "> 
  161.         &nbsp;&nbsp;&nbsp; <input name="reset" type=reset class="singleboarder" value=" 取 消 ">      </td>
  162.     </tr>
  163.     <tr> 
  164.       <td colspan="3" align="center">&nbsp;</td>
  165.     </tr>
  166.   </form>
  167. </table>
  168. </body>
  169. </html>