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

电子政务应用

开发平台:

Java

  1. <%@ page import = "com.vnex.intranet.pub.BaseJdbcDAO"%>
  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="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  6. <%
  7. BaseJdbcDAO jdbcDAO =new BaseJdbcDAO();
  8.     String condition = " where emp_id="+BusinessName.getEmpId();
  9.     String pageTo = "/mainctrl/msg/sentHome?a";
  10.     String searchCondition = "";
  11.     if(request.getParameter("ss") != null)
  12.     {
  13.        condition = " where emp_id="+BusinessName.getEmpId()+" and msg_id in (select msg_id from t_msg_receiver where receiver_id in (select emp_id from t_emp where name like '%"+
  14.           jdbcDAO.changeCode(request.getParameter("search_text"))+"%')) ";
  15.        pageTo += "&ss&search_text="+request.getParameter("search_text");
  16.        searchCondition = "查询条件为:接收人姓名中包含有'"+request.getParameter("search_text")+"'的消息";
  17.     }   
  18.     session.removeAttribute("receiver");
  19. %>
  20. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  21. <HTML>
  22. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  23. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
  24. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
  25. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  26. <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
  27. <script language=JavaScript>
  28.   function checkChar(str)
  29.   {
  30.     var i,j,strTemp;
  31.     strTemp=""<>/\'";
  32.     for (i=0;i<str.length;i++)
  33.     {
  34.       j=strTemp.indexOf(str.charAt(i));
  35.       if (j!=-1)
  36.       {
  37.         return false;
  38.       }
  39.     }
  40.     return true;
  41.   }
  42. function searchMsg(form)
  43. {
  44.    if(checkChar(form.search_text.value))
  45.    {
  46.      form.action="/mainctrl/msg/sentHome?ss";
  47.      form.submit();
  48.    }   
  49.    else
  50.      alert("不要在查询条件中加入"<>/\'之类的字符");
  51. }
  52.    
  53. function newMsg(form)
  54. {
  55.    form.action="/mainctrl/msg/sendMsg?a";
  56.    form.submit();
  57. }
  58. function deleteSentMsgs(form)
  59. {
  60.    if(form.msgIds == null)
  61.    {
  62.       alert("现在尚未有数据可供删除");
  63.       return;
  64.    }
  65.    if(!isChecked(form.msgIds))
  66.    {
  67.       alert("请选择至少一条消息再行删除");
  68.       return;
  69.    }
  70.    if(confirm("是否删除本条消息?"))
  71.    {
  72.       form.action="/mainctrl/msg/deleteSentMsgs";
  73.       form.submit();
  74.    }   
  75. }
  76. function SelectAll(form)
  77. {
  78.   for (var i=0;i<form.elements.length;i++)
  79.   {
  80.     var e = form.elements[i];
  81.     if (e.name != 'C1')
  82.        e.checked = form.C1.checked;
  83.   }
  84. }
  85. </script>
  86. <DIV align=center>
  87. <form name="form1" method="post">
  88.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  89.     <TBODY> 
  90.       <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  91.       <TR> 
  92.         <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
  93.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  94.             <tr valign="top"> 
  95.               <td bgcolor="#fafafa" > 
  96.                 <table width="600" border="0" cellspacing="0" cellpadding="0">
  97.                   <tr valign="top" bgcolor="#cccccc"> 
  98.                     <td> 
  99.                       <table width="600" border="0" cellpadding="2" cellspacing="0">
  100.                         <tr bgcolor="#666666"> 
  101.                             <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>&gt;&gt;<a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>&gt;&gt;<a href="/mainctrl/msg/sentHome"><font color="#ffffff">消息板</font></a>&gt;&gt;已发送的信息</font>
  102.                             </td>
  103.                         </tr>
  104.                         <tr bgcolor="#fafafa" height="30">
  105.                             <td><strong>&nbsp;收件人:</strong>
  106.                                <input type="text" name="search_text" size="20" class="text">&nbsp;
  107.                                <input type="button" value="查询" name="B12" onClick="searchMsg(this.form)" class="text">
  108.                                 &nbsp;&nbsp;
  109.                                <input type="button" value="收到的消息" name="B13" class="text" onclick="location='/mainctrl/msg/receivedHome'" style="width:70px">
  110.                             </td>
  111.                         </tr>   
  112.                       </table>
  113.                       <table width="600" border="0" cellspacing="1" cellpadding="2">
  114.                         <tr bgcolor="#fafafa" height="30">
  115.                            <td colspan="5">&nbsp;
  116.             <input type="button" name="new_msg" class="text" value="新建" onclick="newMsg(this.form)">&nbsp;&nbsp;
  117.             <input type="button" name="delete_msg" class="text" value="删除" onclick="deleteSentMsgs(this.form)">
  118.            </td>
  119.         </tr> 
  120.                         <tr align="center"> 
  121.                           <td width="7%"><font class="strong">选择</font></td>
  122.                           <td width="30%"><font class="strong">标题</font></td>
  123.                           <td width="30%"><font class="strong">收件人</font></td>
  124.                           <td width="13%"><font class="strong">状态</font></td>
  125.                           <td width="24%"><font class="strong">发送日期</font></td>
  126.                         </tr>
  127.                        <comm:msgList queryStr="<%=condition%>" searchWhat="send"> 
  128.                        <vnex:items paging="true"> 
  129.                         <tr bgcolor="<vnex:itemsColor />" align="center"> 
  130.                           <td width="7%"> 
  131.                             <input type="checkbox" name="msgIds" value="<comm:msgAttribute attribute="id" />"> 
  132.                           </td>
  133.                           <td width="30%"><a href="/mainctrl/msg/sentDetail?msgId=<comm:msgAttribute attribute="id" />"><comm:msgAttribute attribute="msg_title" /></a></td>
  134.                           <td width="30%"><comm:msgAttribute attribute="receivers"/></td>
  135.                           <td width="10%"><comm:msgAttribute attribute="status" /></td>
  136.                           <td width="24%"><comm:msgAttribute attribute="send_date" /></td>
  137.                         </tr>
  138.                         </vnex:items> 
  139.                         <tr bgcolor="#e0e0e0">
  140.                           <td width="7%" align="center"><input type="checkbox" name="C1" onclick="SelectAll(this.form)"></td>
  141.                           <td colspan="5">&nbsp;&nbsp;全选</td>
  142.                         </tr>
  143.                         <tr>
  144.                            <td colspan="6" align="left" bgcolor="#fafafa">&nbsp;<vnex:pagingTag pageName="<%=pageTo%>" /> 
  145.                            </td>
  146.                         </tr>
  147.                         </comm:msgList> 
  148.                       </table>
  149.                     </td>
  150.                   </tr>
  151.                 </table>
  152.               </td>
  153.             </tr>
  154.           </table>
  155.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  156.        </TD>
  157.      </TR>
  158.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  159.     </TBODY> 
  160.   </TABLE>
  161.     <BR>
  162.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  163. </form>
  164. </DIV>
  165. </BODY>
  166. </HTML>