<%@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(); String channelNo=Common.getFormatStr(request.getParameter("channelNo")); String keywords=Common.getFormatStr(request.getParameter("keywords")); String sdate=Common.getFormatStr(request.getParameter("sdate")); String edate=Common.getFormatStr(request.getParameter("edate")); String tdate=Common.getFormatStr(request.getParameter("tdate")); String orderword=Common.getFormatStr(request.getParameter("orderword")); try { conn = pool.getConnection(); String offset = Common.getFormatInt(request.getParameter("offset")); if(channelNo.equals("")){ String querytop="select * from jrcms_website_channel where website_no='20150619082201914' and parent_no='20150619091106970' and is_show=1 "; ResultSet rstop = db.executeQuery(conn,querytop); while(rstop!=null&&rstop.next()){ channelNo+=rstop.getString("no")+","; } channelNo=channelNo.substring(0, channelNo.lastIndexOf(",")); } //搜索条件形成 String searchStr = " where website_no='20150619082201914' and channel_node in ("+channelNo+") and is_show=1 "; if(!keywords.equals("")&&!keywords.equals("关键词搜索")){ searchStr+=" and title like '%"+keywords+"%' "; } if(!sdate.equals("")&&!edate.equals("")){ if(sdate.equals(edate)){ searchStr+=" and datediff( day,pub_date,'"+sdate+"' )=0 "; }else{ searchStr+=" and pub_date between '"+sdate+"' and '"+edate+"' "; } } if(!tdate.equals("")){ searchStr+=" and datediff( day,pub_date,'"+tdate+"' )=0"; } if(orderword.equals("")||orderword.equals("1")){ searchStr += " order by pub_date desc"; }else if(orderword.equals("2")){ searchStr += " order by view_count desc"; } if(!tdate.equals("")){ sdate=tdate; edate=tdate; } String query = "select * from jrcms_information" + searchStr; ResultSet rs = pagination.getQueryResult(query, request, conn); int showPages = 10;//底部页数显示个数 %> 新闻动态_新闻_天津奥特泵业

您当前的位置: 首页 > 新闻 > 新闻动态

新闻
公司公告
新闻动态
专题报道
行业资讯
媒体视角
视频中心

新闻动态

检索
日期范围:
" onClick="this.value=''">
按新闻类别:
排序:class="red" <%}%>>按最新发布class="red" <%}%>>按关注度
    <% String title="";String content="";String fullTitle="";String img="";String viewCount=""; String summary="";String cno="";String cSql="";ResultSet cRs =null;String fileName="";String datetime=""; while(rs!=null&&rs.next()){ cno=Common.getFormatStr(rs.getString("channel_node")); viewCount=Common.getFormatStr(rs.getString("view_count")); img = Common.getFormatStr(rs.getString("img")); fullTitle=Common.getFormatStr(rs.getString("title")); title=Common.getFormatStr(rs.getString("title")); summary=Common.getFormatStr(rs.getString("summary")); content=Common.getFormatStr(rs.getString("content")); datetime=Common.getFormatDate("yyyy-MM-dd",rs.getDate("pub_date")); content=content.replaceAll("<\\s*img\\s+([^>]*)\\s*>",""); content = content.replaceAll(" ",""); content = content.replaceAll("<[^<|^>]+>",""); content = content.replaceAll(" ","").replaceAll(" ",""); if(content.length()>100){ content=content.substring(0,100)+"...";} if(title.length()>30){ title=title.substring(0,30)+"...";} cSql = "select * from jrcms_website_channel where website_no='20150619082201914' and no='"+cno+"'"; cRs = db.executeQuery(conn,cSql); if(cRs.next()&&cRs!=null){ fileName=cRs.getString("file_name"); if(!"".equals(fileName)){ fileName= fileName.replaceAll(".jsp","_text.htm"); } } %>
  • _for_<%=fileName%>" title="<%=title%>"><%=title%><%=datetime%>

    <%=content%>

  • <%}%>
<%if(pagination.getTotal()>pageCount){%>
上一页 <%String str = "";String pages[] = pagination.getPages();int nowp = pagination.getCurrenPages();nowp = nowp - nowp % (showPages + 1);for (int i = nowp - 1; i < (nowp + showPages) && i < pages.length; i++) {if (i < 0)i = 0;if (pagination.getCurrenPages() == (i + 1)) {str += "" + (i + 1) + " ";} else {str += " " + (i + 1) + " ";}}str=str.substring(0,str.length()-1);out.print(str); %> 下一页 共<%=pagination.getTotalPages()%>页
<%}%>
<% } catch (Exception e) { e.printStackTrace(); } finally { pool.freeConnection(conn); } %>