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

电子政务应用

开发平台:

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><%= calendarBean.getTaskImport()%></td>
  106.                         </tr>
  107.                         <tr bgcolor="#e0e0e0">
  108.                           <td><font class="strong">&nbsp;公开:</font></td>
  109.                           <td><% if(calendarBean.getTaskVisible()) out.print("是"); else out.print("否"); %></td>
  110.                         </tr>
  111.                         <tr bgcolor="#fafafa"> 
  112.                           <td><font class="strong">&nbsp;详细内容:</font></td>
  113.                           <td>
  114.                             <div align="left">
  115. <pre>
  116. <%= FieldUtil.filterScriptTag(calendarBean.getTaskContent())%>
  117. </pre>
  118.                             </div>
  119.                           </td>
  120.                         </tr>
  121.                         <tr bgcolor="#e0e0e0"> 
  122.                           <td><font class="strong">&nbsp;附件:</font></td>
  123.                           <td>
  124.                           <%
  125.                             Collection coll = calendarBean.getAttachments();
  126.                             if(coll != null && coll.size() != 0)
  127.                             {
  128.                               Iterator it = coll.iterator();
  129.                               while( it.hasNext() )
  130.                               {
  131.                                 String str = (String)it.next();
  132.                                 int s = str.lastIndexOf(SubPathGenerater.getSeperator());
  133.                               String filename = str.substring(s+1);
  134.                               
  135.                               String UTFurl = str.substring(0,s+1)+StringUtil.encode(filename);
  136.                           
  137.                                 out.println("<a href=""+UTFurl+"" target=_blank>"+filename+"</a><br>");
  138.                               }
  139.                             }
  140.                           %>
  141.                           </td>
  142.                         </tr>
  143.                         <tr align="middle" bgcolor="#fafafa">
  144.                           <td colspan="2" height="30">
  145.                           
  146.           <%
  147.             if(request.getParameter("own")!=null && !request.getParameter("own").equals("false"))
  148.             {
  149.           %>
  150.             <input type="button" name="Submit2" value="修改" onClick="return modifyTask()" class="text">
  151.             &nbsp;&nbsp;<input type="button" name="button12" value="删除" onClick="return removeTask()" class="text">
  152.             &nbsp;&nbsp;<input type="button" name="Submit123" value="返回" onClick="backTask()" class="text">
  153.           <%
  154.             }
  155.             else
  156.             {
  157.           %>
  158.             <input type="button" name="Submit2" value="返回" onClick="backTask()" class="text">
  159.           <%
  160.             }
  161.           %>
  162.                           </td>
  163.                         </tr>
  164.                         </tbody> 
  165.                       </table>
  166.                     </td>
  167.                   </tr>
  168.                 </table>
  169.           <input type="hidden" name="calendarIds" value="<%= calendarId%>">
  170. <%
  171.   if(request.getParameter("ssempId")!=null)
  172.   {
  173.     out.println("<input type=hidden name=ssempId value=""+request.getParameter("ssempId")+"">");
  174.   }
  175.   if(request.getParameter("ssStartDate")!=null)
  176.   {
  177.     out.println("<input type=hidden name=ssStartDate value=""+request.getParameter("ssStartDate")+"">");
  178.   }
  179.   if(request.getParameter("ssEndDate")!=null)
  180.   {
  181.     out.println("<input type=hidden name=ssEndDate value=""+request.getParameter("ssEndDate")+"">");
  182.   }
  183.   if(request.getParameter("start")!=null)
  184.   {
  185.     out.println("<input type=hidden name=start value=""+request.getParameter("start")+"">");
  186.   }
  187. %>
  188.           <!--个人信息结束 --> 
  189.           <br>
  190.           <br>  
  191.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  192.        </TD>
  193.     </TR>
  194.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  195.     </TBODY> 
  196.   </TABLE>
  197.   <BR>
  198.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  199. </form></DIV>
  200. </BODY></HTML>