<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!--#include file="../inchuayuwebrlzywzhyweb/web_top.asp"--> 
<%title1=oa.sqlrequest("myKeyword")
if title1="" or title1="请输入搜索关键词..."  then
response.Write"<script>alert('请你选择关键项!');history.go(-1);</script>"
response.end
end if
%>
<link rel="stylesheet" type="text/css" href="../images/page.css">
<link href="../images/nypage.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../images/jquery-1.8.3.min.js"></script>
<SCRIPT type=text/javascript src="../images/jquery-1.7.2.js"></SCRIPT>
<script src="../images/jquery.superslide.2.1.1.js" type="text/javascript"></script>
<SCRIPT type=text/javascript src="../images/load.js"></SCRIPT>
<SCRIPT language="javascript" src="../images/dbl.js"></SCRIPT>
<SCRIPT language=JavaScript type=text/javascript src="../images/sc.js"></SCRIPT>
<link href="../images/pro_dropdown_2.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>
</head>
<body><!--#include file="../head.asp"--><!--#include file="../nbanner.asp"-->
<div id="hyweb"><div id="body_1"><div id="nypage"><!--#include file="../left.asp"--><div id="contain"><div id="contain-1">
                <div id="contain-1-1">
                    站内搜索</div><div id="contain-1-2">当前位置：&nbsp;
            站内搜索&nbsp;&gt;&nbsp;关键字：<font color="#FFFF00"><%=title1%></font></div></div><div id="contain-c">

     <%if title1<>"" then
sqlstr=sqlstr&" and title like '%"&title1&"%'"
end if


						'-----修改每页显示个数 Start--------
						const MaxPerPage=20
						'-----修改每页显示个数 End  --------
						dim totalPut,CurrentPage
						if not isempty(request("page")) then
								currentPage=cint(request("page"))
						else
								currentPage=1
						end if
						
							strsql="select * from c_Article where 0=0    "&sqlstr&" and  classid in (select classid from classlist where (class_show<>'广告形式' and class_show<>'文章形式')   )  order by orderid, Updatetime desc,ID desc"
						
						
						set rs = server.CreateObject("adodb.recordset")
						rs.open strsql,conn,1,1
						rs.pagesize=MaxPerPage '每页显示记录数
						if rs.eof and rs.bof then
							Response.Write "<center><font color=red>还没有添加信息。</font></center>"
						else
					
							totalPut=rs.recordcount
								if currentpage<1 then
									currentpage=1
								end if
								if currentpage>rs.pagecount then
									currentpage=rs.pagecount
								end if
								if (currentpage-1)*MaxPerPage>totalput then
								if (totalPut mod MaxPerPage)=0 then
										currentpage= totalPut \ MaxPerPage
								else
										currentpage= totalPut \ MaxPerPage + 1
								end if
								end if
								rs.absolutepage=currentpage '当前页数
								
										showContent
										showpage totalput,MaxPerPage,"?myKeyword="&title1
							rs.close
							set rs = nothing	
						end if 		
			
			''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
					sub showContent
						dim i 
							i=1
						%>
        <TABLE border=0 cellSpacing=1 cellPadding=5 width="100%" bgColor="#0689DB" 
      align=center>
          
          <TR align=middle bgColor=#fff8f0>
            <TH width="582" height="30" bgcolor="#0689DB"><div align="center" class="STYLE3 STYLE2 STYLE1 STYLE1 STYLE1 STYLE1 STYLE1 STYLE1">标题名 </div></TH>
            <TH width="159" height="30" noWrap bgcolor="#0689DB"><div align="center" class="STYLE3 STYLE2 STYLE1">分类名称 </div></TH>
            <!--<th nowrap>
                    浏览次数
                </th>-->
            <TH width="145" height="30" noWrap bgcolor="#0689DB"><div align="center" class="STYLE3 STYLE2 STYLE1">日期 </div></TH>
          </TR>
          <%do while i<= rs.pagesize
									if rs.eof then exit do
								 set rl=oa.execute("select ParentPath,parentid from classlist where classid="&rs("classid"))
						ccid=rl("parentid")
						if len(rl("ParentPath"))=1 then
						aa=rs("classid")
						else
						bb=split(rl("ParentPath"),",")
						aa=bb(1)
						end if%>	<TR onMouseOver="bgColor='#dddddd'" onMouseOut="bgColor='#ffffff'" bgColor=#ffffff>
            <TD height="30" noWrap title="<%=rs("title")%>"><strong style="font-size:14px; margin-right:10px;" class="icon-signout"></strong><a  href="<%if rs("link")<>"" then%><%=rs("link")%><%else%>../content/?<%=aa%>-<%=rs("classid")%>-<%=rs("id")%>.html<%end if%>" <%if rs("DefaultPicUrl")<>"" then%>onMouseOver="toolTip('<img src=../<%=rs("DefaultPicUrl")%> width=300>')" onMouseOut="toolTip()"<%end if%>  target="_blank" ><%=replace(rs("title"),title1,"<font color=#ff0000>"&title1&"</font>")%></a></TD><!-- <td nowrap title="浏览次数" style="width: 40px">
                0
            </td>-->
            <TD height="30" ><div align="center">
              <%set rc=server.CreateObject("adodb.recordset")
	rc.open"select  top 1  * from classlist where classid="&rs("classid")&" order by rootid,orderid",conn,1,1
	if not rc.eof then
	if rc("Depth")=2 or rc("Depth")=1  then%><%bb=split(rc("ParentPath"),",")
		aa=bb(1)%><a href="../directory/?<%=aa%>-<%=rs("classid")%>.html" target="_blank"><%=rc("classname")%></a><%else%><a href="../channel/?<%=rs("classid")%>.html" target="_blank"><%=rc("classname")%></a><%end if	
	end if
	rc.close
	set rc=nothing%>
            </div></TD>
            <TD height="30" ><div align="center"><%=rs("Updatetime")%> </div></TD></TR>	 <%
								  i=i+1
								if i>=MaxPerPage then exit do
								  rs.movenext
								  loop 
								  %>	
      </TABLE>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
          <tr>
            <td bgcolor="#FFFFFF"><div align="center">
              <%
								   end sub 
						
							function showpage(totalnumber,maxperpage,filename)
							dim n
						
							if totalnumber mod maxperpage=0 then
									n= totalnumber \ maxperpage
							else
									n= totalnumber \ maxperpage+1
							end if
							response.write "<table cellspacing=1 width='100%' border=0 colspan='4' ><form method=Post action="""&filename&"&"&strQuery&"""><tr><td align=right> "
							if CurrentPage<2 then
									response.write "共<b><font color=red>"&totalnumber&"</font></b>条信息&nbsp;首页 上一页&nbsp;"
							else
									response.write "共<b><font color=red>"&totalnumber&"</font></b>条信息&nbsp;<a href="&filename&"&page=1&"&strQuery&">首页</a>&nbsp;"
									response.write "<a href="&filename&"&page="&CurrentPage-1&"&"&strQuery&">上一页</a>&nbsp;"
							end if
						
							if n-currentpage<1 then
									response.write "下一页 尾页"
							else
									response.write "<a href="&filename&"&page="&(CurrentPage+1)&"&"&strQuery&">"
									response.write "下一页</a> <a href="&filename&"&page="&n&"&"&strQuery&">尾页</a>"
							end if
							response.write "&nbsp;页次：<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 "
								response.write "&nbsp;<b>"&maxperpage&"</b>条信息/页 "
						%>
              转到： 
              <select name='page' size='1' style="font-size: 9pt" onChange='javascript:submit()'>
                <%for i = 1 to n%>
                <option value='<%=i%>' <%if CurrentPage=cint(i) then%> selected <%end if%>>第<%=i%>页</option>
                <%next%>
              </select> 
              <%   
							response.write "</td></tr></FORM></table>"
						end function
						%>
              
              
              
            </div></td>
      </tr>
      </table>
    </div></div></div></div></div>
<!--#include file="../foot.asp"--><SCRIPT type=text/javascript src="../images/ToolTip.js"></SCRIPT>
   
</body>
</html>





