<%@ page pageEncoding="UTF-8"%> <%@ include file="newsAdmin/tagHeader.jsp"%> <%@page import="java.util.*,com.goldarmor.live800.info.*,com.goldarmor.live800.database.*"%> <% String newType = request.getParameter("newType"); String numberPerPage = request.getParameter("numberPerPage"); if (numberPerPage == null || numberPerPage.length() == 0) { numberPerPage = "20"; } int pageRows = Integer.parseInt(numberPerPage);//每页 int cpage = 1;//当前页 String pageSt = request.getParameter("pages"); if (pageSt != null && pageSt.length() != 0) { cpage = Integer.parseInt(pageSt); } int allNumber = NewsManager.getNewsNumber(newType);//总记录 int allpage = (allNumber + pageRows - 1) / pageRows; ; //总页数 //判断当前页 if (cpage <= 0) { cpage = 1; } else if (cpage > allpage) { cpage = allpage; } List list = NewsDBM.getList(newType, pageRows, cpage); %> <% if (list != null) { %> <% for (int i = 0; i < list.size(); i++) { News news = (News) list.get(i); request.setAttribute("info", news); String url = "about/news/news" + news.getNewsId()+".html"; if (2 == news.getNewsType()) { url = news.getNewsUrl(); } %> <% } %> <% } %>
<% if (url == null || url.length() == 0) { %> ·<%=news.getNewsTitle()%> <% } else { %> target="_blank" <%} else {%> target="_parent" <%}%>>·<%=news.getNewsTitle()%> <% } %>   <% if (2 == news.getNewsType()) { %>${info.newsReffer} <% } %> <% if (1 == news.getNewsStatus() && 1 == news.getNewsType()) { %> <% } %>