<%@page contentType="text/html;charset=utf-8" import="java.sql.*,java.util.*,jerehnet.jsp.database.*,jerehnet.jsp.util.*,java.text.SimpleDateFormat"%> <% PoolManager pool = new PoolManager(); if (pool == null) { pool = new PoolManager(); } Connection conn = null; DataManager db = new DataManager(); Pagination pagination = new Pagination(); int pageCount = 20; pagination.setCountOfPage(pageCount); try { conn = pool.getConnection(); String offset = Common.getFormatPara(request.getParameter("offset")); //置顶新闻 String query_top="select top 1 title,file_name,pub_date,img,summary from jrcms_information where website_no='20130923161356450' and channel_node='20130923135917355' and is_show=1 and is_top=1 order by is_top,pub_date desc"; ResultSet rs_top = db.executeQuery(conn,query_top); //新闻列表 String query="select title,file_name,pub_date from jrcms_information where website_no='20130923161356450' and channel_node='20130923135917355' and is_show=1 order by pub_date desc,id desc"; ResultSet rs = pagination.getQueryResult(query, request, conn); int showPages = 10; %> Company News_NEWS_Shanghai AgroChina Group

Company News

<% String title="",pub_date="",file_name="",img="",intro=""; while(rs_top!=null&&rs_top.next()){ title = Common.getFormatPara(rs_top.getString("title")); pub_date = Common.getFormatDate("yyyy-MM-dd",rs_top.getDate("pub_date")); file_name = Common.getFormatPara(rs_top.getString("file_name")); img = Common.getFormatPara(rs_top.getString("img")); intro = Common.getFormatPara(rs_top.getString("summary")); %>
NEW <%=pub_date%>
<%=title%>

<%=intro%>

Learn More
<%}%>
    <% while(rs!=null&&rs.next()){ title = Common.getFormatPara(rs.getString("title")); pub_date = Common.getFormatDate("yyyy-MM-dd",rs.getDate("pub_date")); file_name = Common.getFormatPara(rs.getString("file_name")); %>
  • <%=pub_date%> <%=title%>
  • <%}%>
<%if(pagination.getTotal()>10){%>
Prev <%String str = "";for (int i = 0; i < pagination.getTotalPages(); i++) {if (i < 0)i = 0;if (pagination.getCurrenPages() == (i + 1)) {str += "" + (i + 1) + "";} else {str += "" + (i + 1) + "";}}out.print(str);%> Next
<%}%>
NEWSYOUR BEST SOURCE OF PESTICIDE
We're here to help

Easy ways to get the answers you need.

SERVICE ONLINE
Please complete the fields below and we will respond to your inquiry within 24 hours.
Send
Private Policy
<% } catch (Exception e) { e.printStackTrace(); } finally { pool.freeConnection(conn); } %>