%@page contentType="text/html;charset=utf-8" import="java.sql.*,java.util.*,jerehnet.jsp.database.*,jerehnet.jsp.util.*,java.text.SimpleDateFormat,java.util.regex.Matcher,java.util.regex.Pattern"%> <% PoolManager pool = new PoolManager(); if (pool == null) { pool = new PoolManager(); } Connection conn = null; Pagination pagination = new Pagination(); //设置每页显示条数 int pageCount = 6; //pageCount = Integer.parseInt(Common.getFormatInt(request.getParameter("pageCount"))); if(pageCount==0){ pageCount = 10; } pagination.setCountOfPage(pageCount); DataManager db = new DataManager(); try { conn = pool.getConnection(); String offset = Common.getFormatInt(request.getParameter("offset")); String sdate = Common.getFormatStr(request.getParameter("sdate")); String edate = Common.getFormatStr(request.getParameter("edate")); String keyword = Common.getFormatStr(request.getParameter("keywords")); //搜索条件形成 String searchStr = " where website_no='20150623163145344' and channel_node='20150629183256969' and is_show=1 "; if(!sdate.equals("")&&!edate.equals("")){ searchStr+=" and pub_date between '"+sdate+"' and '"+edate+"'"; } if(!keyword.equals("")){ searchStr+=" and title like '%"+keyword+"%'"; } searchStr += " order by pub_date desc,id desc"; String query = "select * from jrcms_information" + searchStr; ResultSet rs = pagination.getQueryResult(query, request, conn); int showPages = 10;//底部页数显示个数 %>