<%@ page contentType="text/html;charset=GBK"%>
<%@ page import="com.wjj.leechdom.common.GlobalMethod" %>
<%@ page import="com.wjj.leechdom.common.PagedResults" %>
<jsp:useBean id="paged"  class="com.wjj.leechdom.common.PagedResults" scope="request"/>
<jsp:useBean id="publicNews" class="com.wjj.leechdom.HomeGetter.publicNews" scope="request" /> 
<HTML>
<HEAD>
<TITLE>广东医药价格信息网</TITLE>
<LINK href="css/main.css" rel=stylesheet type="text/css">
<LINK href="css/line.css" rel=stylesheet type="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<SCRIPT language=JavaScript src="js/common.js"></SCRIPT>
</HEAD>
<%
	Global CHS=new Global();
	String ClassID="21";
	int pageSize=16;
	int currPage=0;
%> 
<BODY bgColor=#ffffff>
<%@ include file="GlobalElements/Header.html" %>
<CENTER>
  <br>
  <form name=leechNews   action=""  method=post>
  <table width="65%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td width="92%"><img src="images/tab06.gif" width="696" height="27"></td>
    </tr>
    <tr> 
      <td height="17" ><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td > 
              
			    <table class="flat3" width="100%" height="29%" border=0 align=center cellpadding=3 cellspacing=0>
                  <tbody>
                    <tr> 
                      <td height="12" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td width=147> <div align="right">关键字：</div></td>
                      <td width="220"> <input name=keyword  class="stedit" size=45 maxlength="100"> 
                      </td>
                      <td width="123"> <div align="left"> </div></td>
                      <td width="180"> <input name="newRequest" type="hidden" value="false"></td>
                    </tr>
                    <tr> 
                      <td> <div align="right">搜索方式：</div></td>
                      <td> <select class="stedit"  size=1 name=Search_style>
                          <option value="1" selected>按信息的标题搜索</option>
                          <option value="2">按信息的内容搜索</option>
                        </select></td>
                      <td>&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr> 
                      <td height="12" colspan="4"><img src="images/spacer.gif" width="1" height="1"></td>
                    </tr>
                    <tr> 
                      <td colspan="4"> <div align="center"> 
                          <input class=adminbutton type=submit value="开始查找" style="FONT-SIZE: 9pt" name=Submit2>
                          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                          <input class=adminbutton type="reset" name="Submit3" value="重置查询">
                        </div></td>
                    </tr>
                  </tbody>
                </table>
			   
				</td>
          </tr>
        </table></td>
    </tr>
  </table>
 </form>  

<%
	//String isnewRequest=request.getParameter("newRequest");
	//if (isnewRequest!=null)	session.setAttribute("newRequest",isnewRequest);
	
	String keyword=request.getParameter("keyword");
	if (keyword==null) keyword="";
	keyword=CHS.UnicodeToChinese(keyword);
	String searchStyle=request.getParameter("Search_style");
	if (searchStyle==null) searchStyle="1";
	
	/*if (((String)session.getAttribute("newRequest")).equals("false"))
	{
		session.setAttribute("keyword",keyword);
		session.setAttribute("Search_style",searchStyle);
	}	*/
	//keyword=(String)session.getAttribute("keyword");
	//searchStyle=(String)session.getAttribute("Search_style");
	publicNews.setTitle(keyword);
	publicNews.setSearchStyle(Integer.parseInt(searchStyle));
	String cpStr=request.getParameter("jumpPage");
	if (cpStr==null) cpStr="1";	
	currPage=Integer.parseInt(cpStr);
%>

<%
	//分页处理
	paged.setRowsPerPage(pageSize);
	paged.setCurrPage(currPage);
	int recordCount=publicNews.countCurrDB(ClassID);
	paged.setPageCount(recordCount,paged.getRowsPerPage()); //根据记录数分页
%>

  <table width="69%" height="18" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="18"><div align="center">
          <%@ include file="GlobalElements/newsPagedTop.jsp" %>
        </div></td>
    </tr>
  </table>
  <table width="69%" border="0" cellspacing="0" cellpadding="0">
    <tr> 
      <td>
	  <%=publicNews.NewsSearch(ClassID,paged.getCurrPage(),paged.getRowsPerPage()) %>
	  </td>
    </tr>
  </table>
  <table width="69%" height="18" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="18"><div align="center"><%@ include file="GlobalElements/newsPagedBottom.jsp" %></div></td>
    </tr>
  </table>
  <jsp:include page="GlobalElements/Copyright.jsp" />
</CENTER></BODY></HTML>
