OnlineMsgList.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:9k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=GB2312" %>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int iUserID = m_session.GetInt("UserID");
  7. int iMsgKind = m_request.GetInt("MsgKind");
  8. int iPageSize = 15;
  9. int iPage = m_request.GetInt("Page");
  10. %>
  11. <html>
  12. <head>
  13. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  14. <title>短信息-- GForce OA 2.0</title>
  15. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  16. <script language="JavaScript" src="/js/changestyle.js"></script>
  17. <script language="JavaScript">
  18. function checkDelMsg()
  19. {
  20.   var isIDCheck = false;
  21.   with(document.delmsg)
  22.   {
  23.     try
  24.     {
  25.       for(i=0;i<elements.length;i++)
  26.       {
  27.         if(elements[i].type=="checkbox"&&elements[i].name=="ID")
  28.         {
  29.           if(elements[i].checked)
  30.           {
  31.             isIDCheck = true;
  32.             break;
  33.           }
  34.         }
  35.       }
  36.     }
  37.     catch(ex)
  38.     {
  39.     }
  40.   }
  41.   if(!isIDCheck)
  42.   {
  43.     alert("请先选择短信息,再删除!");
  44.     return false;
  45.   }
  46.   return window.confirm('确实要删除这些记录吗?');
  47. }
  48. function checktall()
  49. {
  50.     var allselect=true;
  51.     with(document.delmsg)
  52.     {
  53.         if(selectall.value=="全部选择")
  54.         {
  55.             allselect = true;
  56.             selectall.value="全部取消";
  57.         }
  58.         else
  59.         {
  60.             allselect = false;
  61.             selectall.value="全部选择";
  62.         }
  63.         for(i=0;i<elements.length;i++)
  64.         {
  65.             if(elements[i].type=="checkbox")
  66.                 elements[i].checked = allselect;
  67.         }
  68.     }
  69. }
  70. </script>
  71. </head>
  72. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  73.    <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  74.     <tr>
  75.     <td align="center" valign="top">
  76.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  77.         <tr>
  78.           <td height="50" valign="top" background="../images/dy-back.gif">
  79.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  80.               <tr valign="middle">
  81.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  82.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">短信列表</font></strong></td>
  83.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  84.                    <!-- 群增<img src="../images/MulAdd.gif" onMouseOver="this.src='../images/MulAdd_a.gif';" onMouseOut="this.src='../images/MulAdd.gif';" border="0" height="22" width="59">&nbsp;-->
  85.                   <!--单增<img src="../images/Single.gif" onMouseOver="this.src='../images/Single_a.gif';" onMouseOut="this.src='../images/Single.gif';" border="0" height="22" width="59">&nbsp;-->
  86.                   <!-- 修改<img src="../images/Update.gif" onMouseOver="this.src='../images/Update_a.gif';" onMouseOut="this.src='../images/Update.gif';" border="0" height="22" width="59">&nbsp;-->
  87.                   <!-- 删除<img src="../images/Del.gif" onMouseOver="this.src='../images/Del_a.gif';" onMouseOut="this.src='../images/Del.gif';" border="0" height="22" width="59">&nbsp;-->
  88.                   <!-- 查看<img src="../images/Query.gif" onMouseOver="this.src='../images/Query_a.gif';" onMouseOut="this.src='../images/Query.gif';" border="0" height="22" width="59">&nbsp;-->
  89.                   <!-- 组合查询<img src="../images/GroupQuery.gif" onMouseOver="this.src='../images/GroupQuery_a.gif';" onMouseOut="this.src='../images/GroupQuery.gif';" border="0" height="22" width="79">&nbsp;-->
  90.                 </td>
  91.               </tr>
  92.             </table>
  93.           </td>
  94.         </tr>
  95.       </table><br>
  96. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  97.     <tr>
  98.         <td align="center" valign="top"><br>
  99.           <form name="delmsg"  method="post" action="DelMessage.jsp?MsgKind=<%=iMsgKind%>&Page=<%=iPage%>" onsubmit="return checkDelMsg();">
  100.             <table width="95%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  101.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  102.                     <th width="7%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  103.                     <th width="12%" nowrap><font color="#000000">序号</font></th>
  104.                     <th width="30%" nowrap><font color="#000000">信件标题</font></th>
  105.                     <th width="20%"><font color="#000000">附件</font></th>
  106.                     <th width="6%" nowrap><font color="#000000">接收者</font></th>
  107.                     <th width="6%" nowrap><font color="#000000">发送者</font></th>
  108.                     <th width="6%" nowrap><font color="#000000">状态</font></th>
  109.                     <th width="10%" nowrap><font color="#000000">发布时间</font></th>
  110.                     <th width="6%" nowrap><font color="#000000"><%=iMsgKind==OnlineMessage.SavedMsg?"修改":"回复"%></font></th>
  111.                 </tr>
  112. <%
  113. Vector vt = OnlineMessage.getAllRecord(iUserID,iMsgKind);
  114. if(iPage<1)iPage=1;
  115. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  116. if(iPage>iPageCount) iPage=1;
  117. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  118. {
  119.     String strID = ((Vector)vt.get(i)).get(0).toString();
  120.     if(i % 2 == 0)
  121.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  122.     else
  123.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  124.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  125.     out.println("<td align="center" valign="middle">" + (i+1) + "</td>");
  126.     out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + ""><input name="ID" value="" + strID + "" type="checkbox"><a href="ShowMsg.jsp?ID=" + strID + "" target="_blank">" + ((Vector)vt.get(i)).get(1).toString() + "</a></td>");
  127.     String strAccessoriesList = "";
  128.     try
  129.     {
  130.     Vector vt1 = OnlineMessage.getAttInfo(Integer.parseInt(((Vector)vt.get(i)).get(11).toString()));
  131.     if(vt1.size()>0)
  132.     {
  133.       for(int j=0;j<vt1.size();j++)
  134.       {
  135.         strAccessoriesList += "<a href="" + ((Vector)vt1.get(j)).get(2).toString() + "" target="_blank" onclick="alert('请点击右键,然后选择“目标另存为”或者使用下载工具下载保存!');return false;">" + ((Vector)vt1.get(j)).get(1).toString() + "</a><br>";
  136.       }
  137.     }
  138.     else
  139.     {
  140.       strAccessoriesList = "&nbsp;";
  141.     }
  142.     }
  143.     catch(Exception err){strAccessoriesList = "&nbsp;";}
  144.     out.println("<td align="left" valign="middle" nowrap>" + strAccessoriesList + "</td>");
  145.     out.println("<td align="center" valign="middle" nowrap>" + UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vt.get(i)).get(5).toString())) + "</td>");
  146.     out.println("<td align="center" valign="middle" nowrap>" + UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vt.get(i)).get(4).toString())) + "</td>");
  147.     String strIsRead = "";
  148.     if (((Vector)vt.get(i)).get(6).toString().equalsIgnoreCase("true")) {strIsRead="已读";} else {strIsRead="<font color="red"><b>新</b></font>";}
  149.     out.println("<td align="center" valign="middle" nowrap>"+strIsRead+"</td>");
  150.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(2).toString(),"MM月dd日HH:mm") + "</td>");
  151.     if(iMsgKind==OnlineMessage.SavedMsg)
  152.       out.println("<td align="center" valign="middle" nowrap><a href="EditMessage.jsp?ID=" + strID + "">修改</a></td>");
  153.     else
  154.       out.println("<td align="center" valign="middle" nowrap><a href="ReplyMessage.jsp?ID=" + strID + "">回复</a></td>");
  155.     out.println("</tr>");
  156. }
  157. %>
  158.                 <tr>
  159.                     <th align="center" valign="top" colspan="2" nowrap>
  160.                       <input name="selectall" type="button" value="全部选择" onclick="checktall()" style="background-color: #FFFFFF; border: 1 solid #000000">
  161.                       <input name="delete" type="submit" value="删除" style="background-color: #FFFFFF; border: 1 solid #000000">
  162.                     </th>
  163.                     <th align="center" valign="top" colspan="7">
  164. <%
  165. String strCurrentPageURL = request.getRequestURI();
  166. if(iPage<2)
  167. out.print("首页&nbsp;&nbsp;上页");
  168. else
  169. out.print("<a href=""+ strCurrentPageURL+"?MsgKind=" + iMsgKind + "&Page=" + 1 + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?MsgKind=" + iMsgKind + "&Page=" + (iPage-1) + "">上页</a>");
  170. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  171. if(iPage>=iPageCount)
  172. out.print("下页&nbsp;&nbsp;末页");
  173. else
  174. out.print("<a href=""+ strCurrentPageURL+"?MsgKind=" + iMsgKind + "&Page=" + (iPage+1) + "">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?MsgKind=" + iMsgKind + "&Page=" + iPageCount + "">末页</a>");
  175. %>
  176.                     </th>
  177.                 </tr>
  178.             </table>
  179.           </form>
  180.         </td>
  181.     </tr>
  182. </table>
  183. </body>
  184. </html>