%
keywords=request("keywords")
page=clng(request("page"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from Product where (EnTitle like '%"&keywords&"%' or EnContent like '%"&keywords&"%') order by ID desc"
rs.open sql,conn,1,1
%>
Hot Searches:
<%
set rss=server.CreateObject("adodb.recordset")
sql="select top 3 * from search order by times desc"
rss.open sql,conn,1,1
if not(rss.eof and rss.bof) then
do while not rss.eof
keyword=replace(rss("keywords")," ","+")
hotsearch=hotsearch & " " & rss("keywords") & ","
rss.movenext
loop
end if
response.Write(hotsearch)
rss.close
set rss=nothing
%>
<%=keywords%>
<%
if rs.eof and rs.bof then
response.Write("
Sorry!
")
else
rs.PageSize=8
if page=0 then page=1
pages=rs.pagecount
if page > pages then page=pages
rs.AbsolutePage=page
for j=1 to rs.PageSize
%>
<%
rs.movenext
if rs.eof then exit for
next
end if
%>
<%
response.write "
"
if Page<2 then
response.write "<< First Previous "
else
response.write "<< First "
response.write "Previous "
end if
if rs.pagecount-page<1 then
response.write "Next End >>"
else
response.write ""
response.write "NextEnd>>"
end if
rs.close
set rs=nothing
response.write "