msg_sent_home.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page import = "com.vnex.intranet.pub.BaseJdbcDAO"%>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_communication.tld" prefix="comm" %>
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <%
- BaseJdbcDAO jdbcDAO =new BaseJdbcDAO();
- String condition = " where emp_id="+BusinessName.getEmpId();
- String pageTo = "/mainctrl/msg/sentHome?a";
- String searchCondition = "";
- if(request.getParameter("ss") != null)
- {
- 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 '%"+
- jdbcDAO.changeCode(request.getParameter("search_text"))+"%')) ";
- pageTo += "&ss&search_text="+request.getParameter("search_text");
- searchCondition = "查询条件为:接收人姓名中包含有'"+request.getParameter("search_text")+"'的消息";
- }
- session.removeAttribute("receiver");
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_communicate.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language="JavaScript" src="/vnex/util/strUtil.js"></script>
- <script language=JavaScript>
- function checkChar(str)
- {
- var i,j,strTemp;
- strTemp=""<>/\'";
- for (i=0;i<str.length;i++)
- {
- j=strTemp.indexOf(str.charAt(i));
- if (j!=-1)
- {
- return false;
- }
- }
- return true;
- }
- function searchMsg(form)
- {
- if(checkChar(form.search_text.value))
- {
- form.action="/mainctrl/msg/sentHome?ss";
- form.submit();
- }
- else
- alert("不要在查询条件中加入"<>/\'之类的字符");
- }
- function newMsg(form)
- {
- form.action="/mainctrl/msg/sendMsg?a";
- form.submit();
- }
- function deleteSentMsgs(form)
- {
- if(form.msgIds == null)
- {
- alert("现在尚未有数据可供删除");
- return;
- }
- if(!isChecked(form.msgIds))
- {
- alert("请选择至少一条消息再行删除");
- return;
- }
- if(confirm("是否删除本条消息?"))
- {
- form.action="/mainctrl/msg/deleteSentMsgs";
- form.submit();
- }
- }
- function SelectAll(form)
- {
- for (var i=0;i<form.elements.length;i++)
- {
- var e = form.elements[i];
- if (e.name != 'C1')
- e.checked = form.C1.checked;
- }
- }
- </script>
- <DIV align=center>
- <form name="form1" method="post">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center" class="iframestyle" valign="top"><br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr valign="top">
- <td bgcolor="#fafafa" >
- <table width="600" border="0" cellspacing="0" cellpadding="0">
- <tr valign="top" bgcolor="#cccccc">
- <td>
- <table width="600" border="0" cellpadding="2" cellspacing="0">
- <tr bgcolor="#666666">
- <td><font class="strongw"><a href="/mainctrl/home/index"><font color="#ffffff">首页</font></a>>><a href="/mainctrl/communication/main"><font color="#ffffff">通信</font></a>>><a href="/mainctrl/msg/sentHome"><font color="#ffffff">消息板</font></a>>>已发送的信息</font>
- </td>
- </tr>
- <tr bgcolor="#fafafa" height="30">
- <td><strong> 收件人:</strong>
- <input type="text" name="search_text" size="20" class="text">
- <input type="button" value="查询" name="B12" onClick="searchMsg(this.form)" class="text">
-
- <input type="button" value="收到的消息" name="B13" class="text" onclick="location='/mainctrl/msg/receivedHome'" style="width:70px">
- </td>
- </tr>
- </table>
- <table width="600" border="0" cellspacing="1" cellpadding="2">
- <tr bgcolor="#fafafa" height="30">
- <td colspan="5">
- <input type="button" name="new_msg" class="text" value="新建" onclick="newMsg(this.form)">
- <input type="button" name="delete_msg" class="text" value="删除" onclick="deleteSentMsgs(this.form)">
- </td>
- </tr>
- <tr align="center">
- <td width="7%"><font class="strong">选择</font></td>
- <td width="30%"><font class="strong">标题</font></td>
- <td width="30%"><font class="strong">收件人</font></td>
- <td width="13%"><font class="strong">状态</font></td>
- <td width="24%"><font class="strong">发送日期</font></td>
- </tr>
- <comm:msgList queryStr="<%=condition%>" searchWhat="send">
- <vnex:items paging="true">
- <tr bgcolor="<vnex:itemsColor />" align="center">
- <td width="7%">
- <input type="checkbox" name="msgIds" value="<comm:msgAttribute attribute="id" />">
- </td>
- <td width="30%"><a href="/mainctrl/msg/sentDetail?msgId=<comm:msgAttribute attribute="id" />"><comm:msgAttribute attribute="msg_title" /></a></td>
- <td width="30%"><comm:msgAttribute attribute="receivers"/></td>
- <td width="10%"><comm:msgAttribute attribute="status" /></td>
- <td width="24%"><comm:msgAttribute attribute="send_date" /></td>
- </tr>
- </vnex:items>
- <tr bgcolor="#e0e0e0">
- <td width="7%" align="center"><input type="checkbox" name="C1" onclick="SelectAll(this.form)"></td>
- <td colspan="5"> 全选</td>
- </tr>
- <tr>
- <td colspan="6" align="left" bgcolor="#fafafa"> <vnex:pagingTag pageName="<%=pageTo%>" />
- </td>
- </tr>
- </comm:msgList>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form>
- </DIV>
- </BODY>
- </HTML>