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