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

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"><p>&nbsp;</p>
  15.           <table width="90%" border="0" cellpadding="0" cellspacing="0">
  16.                 <tr align="center" valign="middle">
  17.                 <th nowrap colspan=2 align="center"><font color="#000000">公&nbsp;司&nbsp;信&nbsp;息&nbsp;管&nbsp;理</font></th>
  18.               </tr>
  19.                <tr><td>&nbsp;</td>
  20.                 </tr>
  21.               </table>
  22.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
  23.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  24.                     <th width="3%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  25.                     <th width="4%" nowrap><font color="#000000">序号</font></th>
  26.                     <th width="38%" nowrap><font color="#000000">标题</font></th>
  27.                     <th width="10%" nowrap><font color="#000000">浏览次数</font></th>
  28.                     <th width="10%" nowrap><font color="#000000">是否热点</font></th>
  29.                     <th width="10%" nowrap><font color="#000000">发布时间</font></th>
  30.                     <th width="10%" nowrap><font color="#000000">发布用户</font></th>
  31.                     <th width="7%" nowrap><font color="#000000">修改</font></th>
  32.                     <th width="7%" nowrap><font color="#000000">删除</font></th>
  33.                 </tr>
  34. <%
  35. Request m_request = new Request(request);
  36. int iSysDirID = m_request.GetInt("SysDirID");
  37. int iPageSize = 18;
  38. int iPage = m_request.GetInt("Page");
  39. Vector vt = ArticleManager.getRecordBySysDirID(iSysDirID);
  40. if(iPage<1)iPage=1;
  41. int iPageCount = StringNew.getPageCount(vt.size(),iPageSize);
  42. if(iPage>iPageCount) iPage=1;
  43. for(int i=(iPage-1)*iPageSize;i<vt.size()&&i<iPage*iPageSize;i++)
  44. {
  45.     String strID = ((Vector)vt.get(i)).get(0).toString();
  46.     if(i % 2 == 0)
  47.         out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  48.     else
  49.         out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  50.     out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  51.     out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  52.     out.println("<td align="left" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(1).toString() + ""><a href="ShowArticle.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "" target="_blank">" + ((Vector)vt.get(i)).get(1).toString() + "</a></td>");
  53.     out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(7).toString() + "</td>");
  54.     String strIsHot = "";
  55.     if (((Vector)vt.get(i)).get(8).toString().equalsIgnoreCase("true")) {strIsHot="是";} else {strIsHot="否";}
  56.     out.println("<td align="center" valign="middle" nowrap>"+strIsHot+"</td>");
  57.     out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(5).toString(),"yyyy-MM-dd") + "</td>");
  58.     out.println("<td align="center" valign="middle" nowrap>"+ UserManager.getPersonnelNameByUserID(Integer.parseInt(((Vector)vt.get(i)).get(12).toString()))+"</td>");
  59.     out.println("<td align="center" valign="middle" nowrap><a href="EditArticle.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "">修改</a></td>");
  60.     out.println("<td align="center" valign="middle" nowrap><a href="DelArticle.jsp?SysDirID=" + iSysDirID + "&ID=" + strID + "" onclick="return confirm('您确实要删除该信息吗?');">删除</a></td>");
  61.     out.println("</tr>");
  62. }
  63. %>
  64.                 <tr>
  65.                     <th align="center" valign="top" colspan="6">
  66. <%
  67. String strCurrentPageURL = request.getRequestURI();
  68. if(iPage<2)
  69. out.print("首页&nbsp;&nbsp;上页");
  70. else
  71. out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + 1 + "">首页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage-1) + "">上页</a>");
  72. out.print("&nbsp;&nbsp;当前是第" + iPage + "页,共" + vt.size() + "条记录" + iPageCount + "页&nbsp;&nbsp;");
  73. if(iPage>=iPageCount)
  74. out.print("下页&nbsp;&nbsp;末页");
  75. else
  76. out.print("<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + (iPage+1) + "">下页</a>&nbsp;&nbsp;<a href=""+ strCurrentPageURL+"?SysDirID=" + iSysDirID + "&Page=" + iPageCount + "">末页</a>");
  77. %>
  78.                     </th>
  79.                     <th colspan="3">
  80.                         <a href="AddArticle.jsp?SysDirID=<%=iSysDirID%>">新增文章</a>
  81.                     </th>
  82.                 </tr>
  83.             </table>
  84.         </td>
  85.     </tr>
  86. </table>
  87. </body>
  88. </html>