| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <%@page import="com.ws.content.Wzbdao"%>
- <%@ include file="public/showcontent.jsp" %>
- <%@page import="com.ws.content.WzbVDao"%>
- <%@page import="com.ws.content.*"%>
- <%@ include file="public/config.jsp"%>
- <%@ include file="public/function.jsp"%>
- <%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
- <%
- String path = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+ request.getContextPath()+"/";
- %>
- <%
- //////////////////////////////////
- int offset = 0; //当前页
- try {
- offset = Integer.parseInt(request.getParameter("offset"));
- } catch (Exception e) {
- offset = 0;
- }
- //////////////////////////////////
- String flmid = request.getParameter("flmid");
- String lmid = request.getParameter("lmid");
- String wzid = request.getParameter("wzid");
- //String key = request.getParameter("key");
- String key = new String(request.getParameter("key").getBytes("ISO-8859-1"),"gbk");
- System.out.println(key);
- //
- //System.out.println(str);
- try{
- //key = new String(key.getBytes("iso-8859-1"),"gbk");
- //System.out.println("搜索内容:"+key);
- }catch(Exception e){}
- //分页设定开始
- //
- long rows_num = (long)wzvDao.getCountOfSearchPublicWzb(key); //总记录数
- System.out.println("搜索内容总记录数:"+rows_num);
- int page_size =30; //每页记录数
- pgDao.setInt_num(page_size);
- long Current_Page = offset; //当前页
- pgDao.Init(Current_Page, rows_num);
- int l_start = (int)pgDao.getStart();
- int l_end = (int)pgDao.getEnd();
- //分页设定结束
-
- %>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
- <title>长春市城市发展投资控股(集团)有限公司</title>
- <link href="css/main.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <table width="1200" border="0" align="center" cellpadding="0" cellspacing="0">
- <%@include file="top.jsp" %>
- <tr>
- <td height="5" bgcolor="#FFFFFF"></td>
- </tr>
- </table>
- <table width="1200" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
- <tr>
- <td align="left" valign="top"><table width="1200" border="0" cellspacing="0" cellpadding="0" class="borlm">
- <tr>
- <td height="29" align="center" valign="middle" background="images/index_19.jpg"><table width="98%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td width="32%" align="left" valign="middle" class="blue14b">文章搜索</td>
- <td width="68%" align="right" valign="middle"><img src="images/index_tb.gif" width="11" height="11" /><a href="index.jsp" style="text-decoration:none;color: black;"> 首页</a>>> <a href="#" style="text-decoration:none;color: black;">文章搜索</a></td>
- </tr>
- </table></td>
- </tr>
- <tr>
- <td height="930" align="center" valign="top"><table width="98%" border="0" cellspacing="0" cellpadding="0" class="mt10 mb8 black14">
- <tr>
- <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <%
- WzDao wd1 = new WzDao();
- List<Wzb> listy = wd1.getWzbForPageBySql1(key,l_start, page_size);
- if(listy != null)
- {
- for(int i=0;i<listy.size();i++)
- {
- Wzb wzb=listy.get(i);
- String wzbt = wzb.getWzbt();if(4!=wzb.getWzzt()){continue;}
- wzid =wzb.getWzid().trim();
- if(wzbt.length() > 53)
- {
- wzbt=wzbt.substring(0,53)+"..";
- }
- %>
- <tr>
- <td width="93%" height="30" align="left" valign="middle">
- <a target="_blank" href="news.jsp?wzid=<%=wzb.getWzid()%>&&lmid=<%=wzb.getLmid()%>&&target=list2 "><%=wzbt %></a></td>
- <td width="7%" align="left" valign="middle"><%=wzb.getTjsj().substring(0,10) %></td>
- </tr>
- <%}} %>
-
- </table>
-
- <!-- 分页显示 -->
- <script type="text/javascript">
- function page(cpage)
- {
- pageform.offset.value=cpage;
- pageform.submit();
- }
- </script>
- <form name="pageform" method="post" action="<%=path%>main/searchList.jsp?key=<%=key %>">
- <input type="hidden" name="offset" value="<%=offset %>">
- <input type="hidden" name="key" value="<%=key %>">
- <table cellspacing="0" align="center">
- <tbody>
- <tr height="30" class="gray">
- <td>
-
- 总共:<span class="red"> <%=pgDao.getTotalnum()%> </span><span class="web">条记录
-
-
- 当前:<span class="red"><%=pgDao.getCurpage()+1%></span><span class="web">/</span><span class="red"><%=pgDao.getTotalpage()%></span> 页<span class="web">
-
- <%=page_size %>条/页
- 本页显示第</span><span class="red"> <%=l_start+1 %> </span><span class="web">条到第</span><span class="red"> <%=l_end %> </span><span class="web">条</span>
-
- <span class="web"><a href="javascript:page('0')" class="red" >首页</a></span>
- <span class="web"><a href="javascript:page('<%=pgDao.getPrepage()%>')" class="red">上页</a></span>
- <span class="web"><a href="javascript:page('<%=pgDao.getNextpage()%>')" class="red">下页</a></span>
- <span class="web"><a href="javascript:page('<%=pgDao.getTotalpage()-1%>')" class="red">尾页</a></span>
- <span class="web">转到第
- <select name=current onchange="page(current.value-1)">
- <%
- for(int i=1;i<=pgDao.getTotalpage();i++){
-
- %>
- <option value="<%=i%>"<%if(i==(offset+1)){%>selected="selected"<%} %> ><%=i%></option>
- <%} %>
-
- </select>页</span></span>
- </td>
- </tr>
- </tbody>
- </table>
- </form>
- <!-- 右侧页 -->
-
- </td>
- </tr>
- </table></td>
- </tr>
- </table></td>
- </tr>
- </table>
- <%@include file="Bottom.jsp" %>
- </body>
- </html>
|