📄 adminnewslist_jsp.java
字号:
out.write(" \t\t\t<td colspan=\"2\" height=\"1\"><img src=\"../images/dot.gif\" width=\"1\" height=\"1\"></td>\r\n");
out.write(" \t\t\t </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#304D7C\"><div align=\"center\"> \r\n");
out.write(" <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td><div align=\"center\"><a href=\"AdminNewsCheck.jsp\"><font color=\"#FFFFFF\">审 核 新 闻</font></a></div></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" <strong></strong></div></td>\r\n");
out.write(" </tr>\r\n");
out.write("\t\t\t\t <tr bgcolor=\"#000000\"> \r\n");
out.write(" \t\t\t<td colspan=\"2\" height=\"1\"><img src=\"../images/dot.gif\" width=\"1\" height=\"1\"></td>\r\n");
out.write(" \t\t\t </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td bgcolor=\"#304D7C\"><div align=\"center\"> \r\n");
out.write(" <table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td height=\"18\"><div align=\"center\"><a href=\"AdminNewsColumn.jsp\"><font color=\"#FFFFFF\">栏 目 管 理</font></a></div></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("\t\t\t\t\t </div></td>\r\n");
out.write(" </tr>\r\n");
out.write("\t\t\t\t <tr bgcolor=\"#000000\"> \r\n");
out.write(" \t\t\t<td colspan=\"2\" height=\"1\"><img src=\"../images/dot.gif\" width=\"1\" height=\"1\"></td>\r\n");
out.write(" \t\t\t </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table></td>\r\n");
out.write(" <td width=\"15%\"> </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table> </td>\r\n");
out.write(" <td bgcolor=\"#C4C4C4\" width=\"3\" height=\"143\"><img src=\"../images/dot1.gif\" width=\"1\" height=\"1\"></td>\r\n");
out.write(" <td colspan=\"2\" height=\"143\" valign=\"top\" align=\"right\">\r\n");
out.write(" <table border=\"0\" width=\"98%\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"100%\" > \r\n");
out.write(" <p align=\"center\"> \r\n");
out.write(" <div align=\"center\">\r\n");
out.write("\t\t\t\t ");
if(myNewsManager.getCheckedNewsSet(tid) == null) {
out.println(" ");
out.println("<p align='center'> 还 没 有 任 何 文 章</p>");
} else {
PageView pageView = new PageView(myNewsManager.getCheckedNewsSet(tid));
//设置每页最大显示记录数
pageView.setPageSize(15);
ResultSet rs = pageView.getPage(currentPageNo);
out.write("\r\n");
out.write("\t\t\t\t\t<div align=\"center\">\r\n");
out.write("\t\t\t\t\t \r\n");
out.write(" <center>\r\n");
out.write(" <table border=\"0\" cellspacing=\"1\" width=\"100%\" bordercolorlight=\"#000000\" bordercolordark=\"#FFFFFF\" cellpadding=\"0\" bgcolor=\"#000000\">\r\n");
out.write(" <tr bgcolor=\"#304D7C\"> \r\n");
out.write(" <td width=\"50\" align=\"center\" height=\"20\"><strong><font color=\"#FFFFFF\">ID号</font></strong></td>\r\n");
out.write(" <td width=\"389\" align=\"center\"><strong><font color=\"#FFFFFF\">新闻标题</font></strong></td>\r\n");
out.write(" <td width=\"148\" align=\"center\"><strong><font color=\"#FFFFFF\">发布时间</font></strong></td>\r\n");
out.write(" </tr>\r\n");
out.write(" \t");
rs.previous();
for(int i = 0; rs.next() && i < pageView.getPageSize(); i++) {
int nid = rs.getInt("nid");
out.write("\t\t\t\t\t\t\r\n");
out.write(" <tr bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <td height=\"23\" width=\"50\"> \r\n");
out.write(" <p align=\"center\">");
out.print(nid);
out.write(" \r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"389\"> \r\n");
out.write(" <p align=\"center\"><a href=\"../viewnews.jsp?nid=");
out.print(nid);
out.write('"');
out.write(' ');
out.write('>');
out.print(myNewsManager.getTitle(nid));
out.write("</a> \r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"148\" bgcolor=\"#FFFFFF\"> \r\n");
out.write(" <p align=\"center\">\r\n");
out.write("\t\t\t\t\t\t\t");
out.print(myNewsManager.getPostDate(nid) + " " + myNewsManager.getPostTime(nid));
out.write("\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" ");
} // out for loop and still in else clause
out.write(" \r\n");
out.write(" </table>\r\n");
out.write(" </center>\r\n");
out.write(" </div>\r\n");
out.write("\t\t\t\t ");
out.println("<form method=Post action=AdminNewsList.jsp?tid=" + tid + ">");
out.println("<p align='center'>");
if(currentPageNo < 2) {
out.println("<font color='#000080'>首页 上一页</font>");
} else {
out.println("<a href=AdminNewsList.jsp?tid=" + tid + "&page=1>首页</a>");
out.println("<a href=AdminNewsList.jsp?tid=" + tid + "&page=" + (currentPageNo - 1) + ">上一页</a>");
}
if((pageView.getPageCount() - currentPageNo) < 1) {
out.println("<font color='#000080'>下一页 尾页</font>");
} else {
out.println("<a href=AdminNewsList.jsp?tid=" + tid + "&page=" + (currentPageNo + 1) + ">");
out.println("下一页</a> <a href=AdminNewsList.jsp?tid=" + tid + "&page=" + pageView.getPageCount() + ">尾页</a>");
}
out.println("<font color='#000080'> 页次:</font><strong><font color=red>" + currentPageNo + "</font><font color='#000080'>/" + pageView.getPageCount() + "</strong>页</font> ");
out.println("<font color='#000080'> 共<b>" + pageView.getRecordCount() + "</b>篇文章 <b>" + pageView.getPageSize() + "</b>篇文章/页</font> ");
out.println("<font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value=" + currentPageNo + ">");
out.println("<input class=buttonface type='submit' value='Goto' name='cndok'></span></p></form>");
out.write("\r\n");
out.write("\t\t\t\t\t");
rs.close(); // close ResultSet
} // out else clause
out.write("\r\n");
out.write(" </div>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\r\n");
out.write("\t<!-- include common bottom.htm -->\r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "bottom.htm", out, false);
out.write("\r\n");
out.write(" </center></div>\r\n");
out.write("</body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -