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

电子政务应用

开发平台:

Java

  1. <%
  2. /**
  3.  *  $ RCSfile: Conference_Add_Summary_Details.jsp,v $
  4.  *  $ Revision: 1.0 $
  5.  *  $ Date: 2001/07/018 20:18:46 ,created by Shiyong Jian $
  6.  *  $ /mainctrl/conference/uploadSummary $
  7.  *
  8.  *  This is the conference add summary details page.
  9.  *  @author Copyright (c) May. 2001, by VisionNex  Technologies Inc., All Right Reversed.
  10.  */
  11. %>
  12. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  13. <%@ page import="com.vnex.intranet.workflow.pub.value.*" %>
  14. <%@ page import="com.vnex.intranet.system.loader.ConfigParaLoader"%> 
  15. <%@ page import="com.vnex.intranet.util.SubPathGenerater" %> 
  16. <%@ page import="com.vnex.intranet.upload.*"%> 
  17. <%@ page import="com.vnex.intranet.conference.util.ConferenceConstant" %>
  18. <%@ taglib uri="/vnex_conference.tld" prefix="conference" %>
  19. <%@ taglib uri="/vnex_workflow.tld" prefix="workflow" %>
  20. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  21. <jsp:useBean id="mySmartUpload" scope="page" class="com.vnex.intranet.upload.SmartUpload" /> 
  22. <jsp:useBean id="conValueBean" scope="session" class="com.vnex.intranet.conference.value.ConferenceValueBean" />
  23. <jsp:useBean id="conProxyBean" scope="application" class="com.vnex.intranet.conference.proxy.ConferenceProxyBean" />
  24. <%
  25.     int conId = conValueBean.getId();
  26.     //get the start date
  27.     java.sql.Timestamp dStartTime = conValueBean.getBeginDate();
  28.     String sStartTime = dStartTime.toString();
  29.     String showStartDate = sStartTime.substring( 0 , sStartTime.lastIndexOf(":") );           
  30.     //get the end date
  31.     java.sql.Timestamp dEndTime = conValueBean.getEndDate();
  32.     String sEndTime = dEndTime.toString();
  33.     String showEndDate = sEndTime.substring( 0 , sEndTime.lastIndexOf(":") ); 
  34.     // get the update date 
  35.     java.sql.Timestamp dUpdate = conValueBean.getUpdateDate();
  36.     String sUpdate = dUpdate.toString();
  37.     String showUpdate = sUpdate.substring( 0 , sUpdate.lastIndexOf(":") ); 
  38. %>
  39. <%  
  40.     // deal with file upload
  41.     String attachURL = ConfigParaLoader.getParameter("conferenceSummaryAttachmentUrl");
  42.     String root = ConfigParaLoader.getParameter("rootUrl");
  43.     //上传文件
  44.     if( request.getParameter("type") !=null && request.getParameter("type").equals("1") ) 
  45.     {         
  46.         attachURL += SubPathGenerater.getSeperator() + SubPathGenerater.getSubPath( root + SubPathGenerater.getSeperator() + attachURL);
  47.         // Initialization
  48.         mySmartUpload.initialize( pageContext );
  49.         mySmartUpload.setTotalMaxFileSize( Integer.parseInt( ConfigParaLoader.getParameter("attachmentSize") ) );
  50.         // Upload
  51.         mySmartUpload.upload();
  52.         mySmartUpload.save( root + SubPathGenerater.getSeperator() + attachURL  ); 
  53.         Collection c = conValueBean.getSummaryFiles();
  54.         for(int i=0;i<mySmartUpload.getFiles().getCount();i++)
  55.         {
  56.             com.vnex.intranet.upload.File myFile = mySmartUpload.getFiles().getFile(i);
  57.             if (!myFile.isMissing())   
  58.             {
  59.                 WorkflowFileValueBean wf = new WorkflowFileValueBean();
  60.                 wf.setName( myFile.getFileName() ); 
  61.                 wf.setTitle( attachURL + "/" + myFile.getFileName() ); 
  62.                 wf.setDescription( myFile.getFileName() ); 
  63.                 c.add(wf);              
  64.             }                            
  65.         }      
  66.         conValueBean.setSummaryFiles(c);
  67.         session.setAttribute( "conValueBean", conValueBean );              
  68.     }
  69.     //删除文件
  70.     if( request.getParameter("type") !=null &&  request.getParameter("type").equals("2") )
  71.     { 
  72.         // conValueBean = ( ConferenceValueBean )session.getAttribute( "conValueBean" );
  73.         String files[] = request.getParameterValues("attachments");
  74.         if(files!= null)
  75.         {              
  76.             for(int i = 0; i<files.length; i++)
  77.             {
  78.                 SubPathGenerater.deleteFile( root + SubPathGenerater.getSeperator() + files[i] );  
  79.                 conValueBean.removeFile(  files[i] );        
  80.             }     
  81.         }
  82.         session.setAttribute( "conValueBean", conValueBean );     
  83.     }    
  84. %>
  85. <HTML>
  86. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  87. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  88. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  89. <script language="JavaScript1.2" src="/vnex/util/validate.js"></script>
  90. <script language=JavaScript> 
  91. <%
  92.  String flag = request.getParameter("deleteFlag");
  93. %>
  94. function uploadDoc(form)
  95. {      
  96.     form.action="/mainctrl/conference/uploadSummary?type=1&&conferenceId=<%=conId%>"; 
  97.     form.encoding="multipart/form-data"; 
  98.     form.submit();     
  99. function deleteDoc(form) 
  100. {      
  101.     if ( confirm("确定删除?") )
  102.     {   
  103.         //flag= "delete";
  104.         form.action="/mainctrl/conference/uploadSummary?type=2&&conferenceId=<%=conId%>"; 
  105.         form.submit();     
  106.     }
  107. function submitForm(act)
  108. {
  109.     if ( act == 'save' )
  110.     {
  111.          selectAll( document.forms[0].attachments );
  112.          document.forms[0].action='/mainctrl/conference/addSummary?conferenceId=<%=conId%>';
  113.          document.forms[0].submit();
  114.     }
  115.     if ( act == 'return' )
  116.     {
  117.          document.forms[0].action='/mainctrl/conference/browseDetails?conferenceId=<%=conId%>';
  118.          document.forms[0].submit();
  119.     }   
  120. }
  121. </script>
  122. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  123. <DIV align=center>
  124.   <form name="form1" method="post" >
  125.     <TABLE class=outter cellSpacing=0 cellPadding=0 border=0 width="600">
  126.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  127.     <TR> 
  128.         <TD colSpan=3 align="center"><br>
  129.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  130.             <tr bgcolor="#FAFAFA"> 
  131.               <td> 
  132.                  <table width="600" border="0" cellspacing="0" cellpadding="2">
  133.                   <tr bgcolor="#666666" >
  134.                    <td colspan="2" valign="top"><font class="strongw">
  135.                      <jsp:include page="Conference_Navibar_Head.jsp" />
  136.                      会议详细信息</font></td>
  137.                   </tr>
  138.                 </table>
  139.                 <table cellspacing=1 width="600" border=0 cellpadding="2" class=title>
  140.                  <tr bgcolor="#fafafa"> 
  141.                     <td width="123"><font class="strong">&nbsp;会议状态:</font></td>
  142.                     <td colspan=7 width="464"><%=conValueBean.getStatusName() %></td>
  143.                   </tr>
  144.                   <tr bgcolor="#e0e0e0"> 
  145.                     <td width="123"><font class="strong">&nbsp;会议主题:</font></td>
  146.                     <td colspan=7 width="464"><%=conValueBean.getSubject() %></td>
  147.                   </tr>
  148.                   <tr bgcolor="#fafafa"> 
  149.                     <td width="123"><font class="strong">&nbsp;会议地点:</font></td>
  150.                     <td colspan=7 width="464"><%=conValueBean.getBoardroomName() %></td>
  151.                   </tr>
  152.                   <tr bgcolor="#e0e0e0"> 
  153.                     <td width="123"><font class="strong">&nbsp;会议发起人:</font></td>
  154.                     <td colspan=7 width="464"><%=conValueBean.getCreatorName() %></td>
  155.                   </tr>
  156.                   <tr bgcolor="#fafafa"> 
  157.                     <td noWrap width="123"><font class="strong">&nbsp;开始时间:</font></td>
  158.                     <td noWrap colspan="7" width="464"><%=showStartDate %> </td>
  159.                   </tr>
  160.                   <tr bgcolor="#e0e0e0"> 
  161.                     <td noWrap width="123"><font class="strong">&nbsp;终束时间:</font></td>
  162.                     <td noWrap colspan="7" width="464"><%=showEndDate %></td>
  163.                   </tr>
  164.                   <tr bgcolor="#fafafa"> 
  165.                     <td width="123"><font class="strong">&nbsp;联系人及联系方法:</font></td>
  166.                     <td colspan=7 width="464"><%=conValueBean.getContactWay() %></td>
  167.                   </tr>
  168.                  <conference:attendeeList conferenceId="<%=conId%>">
  169.                   <%  
  170.                      String attendeeCount = (String)pageContext.getAttribute("attendeeNum");
  171.                      int rowspan = 2;
  172.                      if ( attendeeCount  != null )
  173.                        rowspan = Integer.parseInt( attendeeCount ) + 2;
  174.                    %>
  175.                   <tr> 
  176.                     <td width="123" rowspan="<%=rowspan%>" bgcolor="#fafafa"><font class="strong">&nbsp;参加人:</font></td>
  177.                     <td colspan=7 bgcolor="#fafafa" width="464">总共<%=attendeeCount%>人 </td>
  178.                   </tr>
  179.                   
  180.                   <tr>
  181.                     <td bgcolor="#fafafa" width="90"><font class="strong">姓名</font></td>
  182.                     <td bgcolor="#fafafa" width="100"><font class="strong">部门</font></td>
  183.                     <td bgcolor="#fafafa" width="100"><font class="strong">职务</font></td>
  184.                     <td bgcolor="#fafafa" width="187"><font class="strong">反馈</font></td>
  185.                   </tr>
  186.                   <vnex:items  > 
  187.                   <tr>  
  188.                     <td bgcolor="#fafafa" width="90"><workflow:executorsAttribute attribute="executor_name"/> </td>
  189.                     <td bgcolor="#fafafa" width="100"><workflow:executorsAttribute attribute="executor_department" /></td>
  190.                     <td bgcolor="#fafafa" width="100"><workflow:executorsAttribute attribute="executor_title" /></td>
  191.                     <td bgcolor="#fafafa" width="187"><!--workflow:executorsAttribute attribute="executor_status_name" /--><workflow:executorsAttribute attribute="executor_notes" />&nbsp;</td>
  192.                   </tr>
  193.                    </vnex:items> 
  194.                    </conference:attendeeList>
  195.                   <tr bgcolor="#fafafa"> 
  196.                     <td valign=top noWrap width="123" ><font class="strong">&nbsp;会议最后通知时间:</font> 
  197.                     </td>
  198.                     <td colspan=4   width="464"><%=showUpdate %>
  199.                     </td>
  200.                   </tr>
  201.                   <tr bgcolor="#e0e0e0"> 
  202.                     <td width="123"> 
  203.                       <font class="strong">&nbsp;会议纪要:</font>
  204.                     </td>
  205.                     <td colspan=4 bgcolor="#e0e0e0" width="464">
  206.                       <select size="5" name="attachments"   multiple style="width:300" class="text">
  207.                         <conference:fileList collection="<%=conValueBean.getSummaryFiles()%>"> 
  208.                         <conference:items> 
  209.                         <option value="<conference:fileAttribute attribute='WorkflowFile_title' />" > 
  210.                         <conference:fileAttribute attribute="WorkflowFile_name"/> 
  211.                         </option>
  212.                         </conference:items>
  213.                         </conference:fileList> 
  214.                       </select>
  215.                       <input type="button" name="delete" value="删除" class="file" onClick="deleteDoc( this.form )">
  216.                       <br>
  217.                       <input type="file" name="file" class="file" size="24">
  218.                       <input type="button" name="post" value="上传" class="file" onClick="uploadDoc( this.form )">
  219.                     </td>
  220.                    </tr>
  221.                   <tr align="center" bgcolor="#fafafa"> 
  222.                     <td colspan="6" height="30"> 
  223.                       <input type="button" name="saveButton" class=text value="保存" onClick="submitForm('save') ">&nbsp;&nbsp;
  224.                       <input type="button" name="desertButton" class=text value="放弃" onClick="submitForm('return') ">
  225.                     </td>
  226.                   </tr>
  227.                 </table>
  228.               </td>
  229.             </tr>
  230.           </table>         
  231.       <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  232. </TD>
  233.     </TR>
  234.     <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  235.     </TABLE>
  236.   <BR>
  237.    <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  238. </form></DIV>
  239. </BODY></HTML>