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

电子政务应用

开发平台:

Java

  1. <%@ page import="com.vnex.intranet.util.*" %>
  2. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  3. <%@ taglib uri="/vnex_communication.tld" prefix="comm" %>
  4. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  5. <jsp:useBean id="leaveWordProxy" scope="application" class="com.vnex.intranet.communication.leaveword.proxy.LeaveWordProxyBean" />
  6. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  7. <%
  8.     String addConTime = leaveWordProxy.getYesterday();
  9.     String condition = " emp_id="+BusinessName.getEmpId()+" and (end_date>'"+addConTime+"' or end_date is null) ";
  10.     String pageTo = "/mainctrl/leaveword/home?a";
  11.     String deleteSuffix = "/mainctrl/leaveword/deleteLeaveWordsSuccess";
  12.     String start = "1";
  13.     if(request.getParameter("start") != null)
  14.         start = request.getParameter("start");
  15.     if(request.getParameter("history") != null)
  16.     {
  17.        condition = "emp_id="+BusinessName.getEmpId()+" and end_date<'"+addConTime+"'";
  18.        pageTo += "&history";
  19.        deleteSuffix += "?history";
  20.     }
  21. %>
  22. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  23. <HTML>
  24. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  25. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  26. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  27. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  28. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  29. <script language=JavaScript>
  30. function writeLeaveWord(form)
  31. {
  32.    form.action="/mainctrl/leaveword/writeLeaveWord";
  33.    form.submit();
  34. }
  35. function deleteLeaveWords(form)
  36. {
  37.    if(form.leaveWordIds == null)
  38.    {
  39.       alert("目前尚未有数据可供删除");
  40.       return;
  41.    }
  42.    if(!isChecked(form.leaveWordIds))
  43.    {
  44.       alert("请选择至少一条留言再进行删除");
  45.       return;
  46.    }
  47.    if(confirm("是否删除所选留言?"))
  48.    {
  49.       form.action="<%=deleteSuffix%>";
  50.       form.submit();
  51.    }   
  52. }
  53. function deleteHistoryLeaveWord(form)
  54. {
  55.    form.action="/mainctrl/leaveword/home?history";
  56.    form.submit();
  57. }
  58. function SelectAll(form)
  59. {
  60.   for (var i=0;i<form.elements.length;i++)
  61.   {
  62.     var e = form.elements[i];
  63.     if (e.name != 'C1')
  64.        e.checked = form.C1.checked;
  65.   }
  66. }
  67. function search(form)
  68. {
  69.    form.action="/mainctrl/leaveword/search";
  70.    form.submit();
  71. }
  72. </script>
  73. <DIV align=center>
  74. <form name="form1" method="post">
  75.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  76.     <TBODY> 
  77.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  78.     <TR> 
  79.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  80.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  81.             <tr valign="top"> 
  82.               <td bgcolor="#fafafa" > 
  83.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  84.                   <tr valign="top" bgcolor="#cccccc"> 
  85.                     <td> 
  86.                       <table width="600" border="0" cellspacing="0" cellpadding="2">
  87.                         <tr bgcolor="#666666"> 
  88.                           <td><font class="strongw">
  89.                             <a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;
  90.                             <a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>&gt;&gt;
  91. <%
  92.         if(request.getParameter("history") == null)
  93.         {
  94. %>                                  
  95. 留言板
  96. <%
  97.         }
  98.         else
  99.         {
  100. %>
  101. <a href="/mainctrl/leaveword/home"><font color="#ffffff">留言板</font></a>&gt;&gt;过期留言
  102. <%      }%>
  103.                             </font>
  104.                           </td>
  105.                         </tr>
  106. <%
  107.          if(request.getParameter("history") == null)
  108.          {
  109. %>                               
  110.                         <tr bgcolor="#fafafa" height="30"> 
  111.                           <td><strong>&nbsp;姓名:</strong>
  112.                               <input type="text" class="text" size="10" name="search_name">&nbsp;
  113.                               <input type="button" name="Button1" value="查询" onClick="search(this.form)" class="text">
  114.                               &nbsp;&nbsp;<input type="button" name="Button2" value="高级查询" onclick="location='/mainctrl/leaveword/advanceSearch'" class="text">
  115.                           </td>
  116.                         </tr>
  117. <%       }%>                      
  118.                       </table>
  119.                       <table class=title border="0" cellpadding="2" cellspacing="1" width="600">
  120.                          <tr bgcolor="#fafafa"> 
  121.                              <td colspan="4" height="30">&nbsp;
  122. <%
  123.                if(request.getParameter("history") == null)
  124.                {
  125. %>                                                   
  126.                                     <input type="button" value="新增" name="B3" onClick="writeLeaveWord(this.form)" class="text">
  127.                                     &nbsp;&nbsp;
  128. <%             }
  129. %>            
  130.                                     <input type="button" value="删除" name="B3" onClick="deleteLeaveWords(this.form)" class="text">
  131.                                     &nbsp;&nbsp;
  132. <%             if(request.getParameter("history") != null)
  133.                {
  134. %>                                                   
  135.                                     <input type="button" value="返回" name="B3" onClick="location='/mainctrl/leaveword/home'" class="text">
  136.                                     &nbsp;&nbsp;
  137. <%             }                                    
  138.                else
  139.                {
  140. %>                                                   
  141.                                     <input type="button" value="过期留言" name="B3" onclick="deleteHistoryLeaveWord(this.form)" class="text" style="width:60px">
  142.                                     &nbsp;&nbsp;
  143. <%             }%>                                    
  144.                             </td>
  145.                           </tr>
  146.                             <tr align="center"> 
  147.                                 <td width="42"><strong>选择</strong></td>
  148.                                 <td width="184"><strong>留言内容</strong></td>
  149.                                 <td width="194"><strong>留言时间</strong> </td>
  150.                                 <td width="155"><strong>留言截止时间</strong></td>
  151.                             </tr>
  152.                             <comm:leaveWordList queryStr="<%=condition%>">
  153.                             <vnex:items paging="true">
  154.                             <tr  bgcolor="<vnex:itemsColor />" align="center"> 
  155.                                <td width="42">
  156.                                  <input type="checkbox" name="leaveWordIds" value="<comm:leaveWordAttribute attribute="id" />">
  157.                                </td>
  158.                                <td width="184">
  159.                                  <a href="/mainctrl/leaveword/leaveWordDetail?leaveWordId=<comm:leaveWordAttribute attribute="id" />&start=<%=start%>
  160. <%
  161.                 if(request.getParameter("history") != null)
  162.                 {
  163. %>
  164. &history
  165. <%}%>                                                  
  166.                                   "><comm:leaveWordAttribute attribute="msg_body_list" />
  167.                                   </a>   
  168.                                <td width="194"><comm:leaveWordAttribute attribute="write_date" /></td>
  169.                                <td width="155"><comm:leaveWordAttribute attribute="end_date" /></td>
  170.                            </tr>
  171.                            </vnex:items>
  172.                            <tr>
  173.                               <td width="42" bgcolor="#e0e0e0" align="center">
  174.                                  <input type="checkbox" name="C1" onclick="SelectAll(this.form)">
  175.                               </td>
  176.                               <td colspan="3" bgcolor="#e0e0e0">       
  177.                                      &nbsp;&nbsp;全选
  178.                               </td>
  179.                         </tr>
  180.                         <tr>
  181.                            <td colspan="4" align="left" bgcolor="#fafafa">
  182.                               &nbsp;<vnex:pagingTag pageName="<%=pageTo%>" /> 
  183.                            </td>
  184.                         </tr>
  185.                         </comm:leaveWordList>
  186.                   </table>
  187.               </td>
  188.             </tr>
  189.           </table> 
  190.           </td>
  191.           </tr>
  192.           </table>     
  193.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  194.        </TD>
  195.      </TR>
  196.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  197.     </TBODY> 
  198.   </TABLE>
  199.     <BR>
  200.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  201. </form>
  202. </DIV>
  203. </BODY>
  204. </HTML>