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

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. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  7. <title>新闻管理-- GForce OA 2.0</title>
  8. <link href="/css/txt.jsp" rel="stylesheet" type="text/css">
  9. <script language="JavaScript" src="/js/changestyle.js"></script>
  10. </head>
  11. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  12.    <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  13.     <tr>
  14.     <td align="center" valign="top">
  15.       <table width="100%" border="0" cellpadding="0" cellspacing="0">
  16.         <tr>
  17.           <td height="50" valign="top" background="../images/dy-back.gif">
  18.             <table width="100%" border="0" cellpadding="0" cellspacing="0">
  19.               <tr valign="middle">
  20.                 <td width="61" align="center" height="20"><img src="../images/dy-01.gif" width="38" height="36"></td>
  21.                 <td width="118" nowrap="nowrap" valign="middle"><strong><font color="#000000">信息中心</font></strong></td>
  22.                 <td align="right" nowrap="nowrap" valign="bottom">&nbsp;
  23.                    <!-- 群增<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;-->
  24.                   <!--单增<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;-->
  25.                   <!-- 修改<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;-->
  26.                   <!-- 删除<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;-->
  27.                   <!-- 查看<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;-->
  28.                   <!-- 组合查询<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;-->
  29.                 </td>
  30.               </tr>
  31.             </table>
  32.           </td>
  33.         </tr>
  34.       </table><br>
  35. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  36.     <tr>
  37.         <td align="center" valign="top"><p>&nbsp;</p>
  38.           <table width="90%" border="0" cellpadding="0" cellspacing="0">
  39.                 <tr align="center" valign="middle">
  40.                 <th nowrap colspan=2 align="left"><font color="#000000">信&nbsp;息&nbsp;列&nbsp;表:</font></th>
  41.               </tr>
  42.                <tr><td>&nbsp;</td>
  43.                 </tr>
  44.               </table>
  45.             <table width="90%" border="0" align="center" cellspacing="0">
  46.                 <tr>
  47.                     <td align="left" valign="top">
  48. <%
  49. Request m_request = new Request(request);
  50. int iSysDirID = m_request.GetInt("SysDirID");
  51. int iPageSize = 18;
  52. int iPage = m_request.GetInt("Page");
  53. Vector vt = ArticleManager.getRecordBySysDirIDWithSub(iSysDirID);
  54. if(iPage<1)iPage=1;
  55. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  56. if(iPage>iPageCount) iPage=1;
  57. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  58. {
  59.     String strID = ((Vector)vt.get(i)).get(0).toString();
  60.     out.println("<li><a title="" + ((Vector)vt.get(i)).get(1).toString() + "" href="ShowArticle.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "" target="_blank"><font color="#0A0A0A">" + ((Vector)vt.get(i)).get(1).toString() + "</font></a>");
  61.     out.println("(" + StringNew.GetDateString(((Vector)vt.get(i)).get(5).toString(),"MM月dd日") + ")</li>");
  62. }
  63. %>
  64.                     </td>
  65.                     <tr><td>&nbsp;</td></tr>
  66.                 <tr>
  67.                     <th align="center" valign="top">
  68. <%
  69. String strCurrentPageURL = request.getRequestURI();
  70. if(iPage<2)
  71. out.print("首页&nbsp;&nbsp;上页");
  72. else
  73. out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + 1 + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage-1) + "">上页</a>");
  74. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  75. if(iPage>=iPageCount)
  76. out.print("下页&nbsp;&nbsp;末页");
  77. else
  78. out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage+1) + "">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + iPageCount + "">末页</a>");
  79. %>
  80.                     </th>
  81.                 </tr>
  82.             </table>
  83.         </td>
  84.     </tr>
  85. </table>
  86. </body>
  87. </html>