Calendar_detail.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:10k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.calendar.value.*"%>
  3. <%@ page import="com.vnex.intranet.calendar.proxy.*"%>
  4. <%@ page import="com.vnex.intranet.util.*"%>
  5. <%@ page import="java.util.*" %>
  6. <%@ page import="java.sql.*" %>
  7. <%@ page import="java.net.*"%>
  8. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  9. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  10. <jsp:useBean id="calendarProxy" class="com.vnex.intranet.calendar.proxy.CalendarProxyBean" scope="application" />
  11. <jsp:useBean id="calendarBean" class="com.vnex.intranet.calendar.value.CalendarValueBean" scope="page" />
  12. <%
  13.   int calendarId = 0;
  14.   if(request.getParameter("taskId")!=null && !request.getParameter("taskId").equals(""))
  15.     calendarId = Integer.parseInt(request.getParameter("taskId"));
  16.   calendarBean = calendarProxy.getCalendarDetail(calendarId);
  17. %>
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  19. <HTML>
  20. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  21. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  22. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  23. <script language="javascript" src="/vnex/validate.js" ></script>
  24. <script language=JavaScript>
  25. function removeTask()
  26. {
  27.   if(!confirm("是否确定删除?"))
  28.   {
  29.     return false;
  30.   }
  31.  myform.action= "/mainctrl/calendar/removeCalendarSuccess";
  32.   myform.submit();
  33. }
  34. function modifyTask()
  35. {
  36.  myform.action= "/mainctrl/calendar/modifyCalendar?type=0";
  37.   myform.submit();
  38. }
  39. function backTask()
  40. {
  41.   myform.action = "/mainctrl/calendar/getCalendarList?search=ok&back=ok";
  42.   myform.submit();
  43. }
  44. </script>
  45. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  46. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  47. <DIV align=center>
  48. <form name="myform" method="post" action="">
  49.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  50.     <TBODY> 
  51.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  52.     <TR> 
  53.         <TD colSpan=3 align="center" class="iframestyle" valign="top"> <!--菜单开始 --> 
  54.           <!--分隔线结束 --> <!--个人信息开始 --> <br>
  55.           <table width="600" border="1" cellspacing="1" bordercolor="#666666" class="iframestyle">
  56.             <tr valign="top"> 
  57.               <td bgcolor="#fafafa"> 
  58.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  59.                   <tr valign="top" bgcolor="#666666"> 
  60.                     <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;<a href="/mainctrl/calendar/getCalendarList"><font color="#FFFFFF">日程安排</font></a>&gt;&gt;任务详细信息</font>
  61.                     </td>
  62.                   </tr>
  63.                   
  64.                       <table cellpadding="2" width="100%" cellspacing="1" align="center" class="title">
  65.                         <tbody> 
  66.                         <%
  67.                           Timestamp startDate = calendarBean.getStartDate();
  68.                           Timestamp endDate = calendarBean.getEndDate();
  69.                           Calendar cd = Calendar.getInstance();
  70.                           if(startDate!=null)
  71.                           {
  72.                             cd = TimeStamp.convertTimestampToCalendar(startDate);
  73.                           }
  74.                           int sYear = cd.get(Calendar.YEAR);
  75.                           int sMonth = cd.get(Calendar.MONTH) + 1;
  76.                           int sDay = cd.get(Calendar.DAY_OF_MONTH);
  77.                           int sHour = cd.get(Calendar.HOUR_OF_DAY);
  78.                           int sMinute = cd.get(Calendar.MINUTE);
  79.                
  80.                           if(endDate!=null)
  81.                           {
  82.                             cd = TimeStamp.convertTimestampToCalendar(endDate);
  83.                           }
  84.                           int eYear = cd.get(Calendar.YEAR);
  85.                           int eMonth = cd.get(Calendar.MONTH) + 1;
  86.                           int eDay = cd.get(Calendar.DAY_OF_MONTH);
  87.                           int eHour = cd.get(Calendar.HOUR_OF_DAY);
  88.                           int eMinute = cd.get(Calendar.MINUTE);
  89.                         %>
  90.                         <tr bgcolor="#e0e0e0"> 
  91.                           <td width="17%"><font class="strong">&nbsp;开始时间:</font></td>
  92.                           <td width="83%"> 
  93.                             日期:<%= sYear%>-<%= sMonth%>-<%= sDay%> 时刻:<%= sHour%>:<% if(sMinute==0) out.print(sMinute+"0"); else out.print(sMinute);%> </td>
  94.                         </tr>
  95.                         <tr bgcolor="#fafafa">
  96.                           <td width="17%"><font class="strong">&nbsp;截止时间:</font></td>
  97.                           <td width="83%">日期:<%= eYear%>-<%= eMonth%>-<%= eDay%> 时刻:<%= eHour%>:<% if(eMinute==0) out.print(eMinute+"0"); else out.print(eMinute);%> </td> 
  98.                         </tr>
  99.                         <tr bgcolor="#e0e0e0"> 
  100.                           <td><font class="strong">&nbsp;主题:</font></td>
  101.                           <td><%= FieldUtil.filterScriptTag(calendarBean.getTaskName())%></td>
  102.                         </tr>
  103.                         <tr bgcolor="#fafafa">
  104.                           <td><font class="strong">&nbsp;重要度:</font></td>
  105.                           <td>
  106.                           <% 
  107.                                   if(calendarBean.getTaskImport().equals("0"))
  108.                                     out.print("不指定");
  109.                                   else if(calendarBean.getTaskImport().equals("1"))
  110.                                     out.print("低");
  111.                                   else if(calendarBean.getTaskImport().equals("2"))
  112.                                     out.print("中");
  113.                                   else if(calendarBean.getTaskImport().equals("3"))
  114.                                     out.print("高");
  115.                           %>
  116.                           </td>
  117.                         </tr>
  118.                         <tr bgcolor="#e0e0e0">
  119.                           <td><font class="strong">&nbsp;公开:</font></td>
  120.                           <td><% if(calendarBean.getTaskVisible()) out.print("是"); else out.print("否"); %></td>
  121.                         </tr>
  122.                         <tr bgcolor="#fafafa">
  123.                           <td><font class="strong">&nbsp;协作者:</font></td>
  124.                           <td><%= calendarBean.getCoadjutant()%></td>
  125.                         </tr>
  126.                         <tr bgcolor="#e0e0e0"> 
  127.                           <td><font class="strong">&nbsp;详细内容:</font></td>
  128.                           <td>
  129.                             <div align="left">
  130. <pre>
  131. <%= FieldUtil.filterScriptTag(calendarBean.getTaskContent())%>
  132. </pre>
  133.                             </div>
  134.                           </td>
  135.                         </tr>
  136.                         <tr bgcolor="#fafafa"> 
  137.                           <td><font class="strong">&nbsp;附件:</font></td>
  138.                           <td>
  139.                           <%
  140.                             Collection coll = calendarBean.getAttachments();
  141.                             if(coll != null && coll.size() != 0)
  142.                             {
  143.                               Iterator it = coll.iterator();
  144.                               while( it.hasNext() )
  145.                               {
  146.                                 String str = (String)it.next();
  147.                                 int s = str.lastIndexOf(SubPathGenerater.getSeperator());
  148.                               String filename = str.substring(s+1);
  149.                               
  150.                               String UTFurl = str.substring(0,s+1)+StringUtil.encode(filename);
  151.                           
  152.                                 out.println("<a href=""+UTFurl+"" target=_blank>"+filename+"</a><br>");
  153.                               }
  154.                             }
  155.                           %>
  156.                           </td>
  157.                         </tr>
  158.                         <tr align="middle" bgcolor="#fafafa">
  159.                           <td colspan="2" height="30">
  160.                           
  161.           <%
  162.             if(request.getParameter("own")!=null && !request.getParameter("own").equals("false"))
  163.             {
  164.           %>
  165.             <input type="button" name="Submit2" value="修改" onClick="return modifyTask()" class="text">
  166.             &nbsp;&nbsp;<input type="button" name="button12" value="删除" onClick="return removeTask()" class="text">
  167.             &nbsp;&nbsp;<input type="button" name="Submit123" value="返回" onClick="backTask()" class="text">
  168.           <%
  169.             }
  170.             else
  171.             {
  172.           %>
  173.             <input type="button" name="Submit2" value="返回" onClick="backTask()" class="text">
  174.           <%
  175.             }
  176.           %>
  177.                           </td>
  178.                         </tr>
  179.                         </tbody> 
  180.                       </table>
  181.                     </td>
  182.                   </tr>
  183.                 </table>
  184.           <input type="hidden" name="calendarIds" value="<%= calendarId%>">
  185. <%
  186.   if(request.getParameter("ssempId")!=null)
  187.   {
  188.     out.println("<input type=hidden name=ssempId value=""+request.getParameter("ssempId")+"">");
  189.   }
  190.   if(request.getParameter("ssStartDate")!=null)
  191.   {
  192.     out.println("<input type=hidden name=ssStartDate value=""+request.getParameter("ssStartDate")+"">");
  193.   }
  194.   if(request.getParameter("ssEndDate")!=null)
  195.   {
  196.     out.println("<input type=hidden name=ssEndDate value=""+request.getParameter("ssEndDate")+"">");
  197.   }
  198.   if(request.getParameter("start")!=null)
  199.   {
  200.     out.println("<input type=hidden name=start value=""+request.getParameter("start")+"">");
  201.   }
  202. %>
  203.           <!--个人信息结束 --> 
  204.           <br>
  205.           <br>  
  206.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  207.        </TD>
  208.     </TR>
  209.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  210.     </TBODY> 
  211.   </TABLE>
  212.   <BR>
  213.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  214. </form></DIV>
  215. </BODY></HTML>