<!--#include file="connshi.asp"-->
<% Call head()
Call saycarda("查询")
name=request("name")


if name="" then
   name="%"
end if 

set rs=server.createobject("adodb.recordset")
Sql = "select * from [shici] WHERE name like '%"&trim(name)&"%' order by id desc"
rs.open sql,connshici,1,1

 if rs.eof and rs.bof then str="暂无纪录"
 if str="" then
   rs.pagesize=2
   pages=rs.pagecount
   records=rs.recordcount
   currentpage=request("currentpage")
if currentpage="" or currentpage<1 then              currentpage=1
   currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
   rs.absolutepage=currentpage
else
   currentpage=1
   records=0
   pages=1
 end If

 %>


  <%linenumber=rs.pagesize%> <%do while (not rs.eof) and (line<linenumber)%> 
    －－－－－－－<br/>
		标题:<%=rs("name")%><br/>
		内容:<br/>
		<%=rs("content")%><br/>
复制:<input name="11" type="text" value="<%=ubb(rs("content"))%>"/><br/>
 <%rs.movenext%> <%line=line+1%> <%loop%>

第<%=currentpage%>页 共<%=Records%>编 共<%=Pages%>页<br/>
<%
 ii=currentpage-5
 iii=currentpage+5
 if ii < 1 then
    ii=1
 end if
 if iii > pages then
    iii=pages
 end if
 if currentpage > 6 then
  %><a href="search.asp?name=<%=name%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;currentpage=1">1</a> ...<%
 end if
 for i=ii to iii
   If i<>currentpage then
  %><a href="search.asp?name=<%=name%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;currentpage=<%=i%>"><%=i%></a><%
   else
 %> <%=i%> <%
   end if
 next
 if pages > currentpage+5 then
 %>... <a href="search.asp?name=<%=name%>&amp;sid=<%=sid%>&amp;saytk=<%=saytk%>&amp;currentpage=<%=pages%>"><%=pages%></a><%
  end if
 %><br/>
<a href="index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">诗词欣赏</a>
<br/>
<a href='/bbs/?sid=<%=sid%>&amp;saytk=<%=saytk%>'>社区首页</a><br/>
<a href='/?sid=<%=sid%>&amp;saytk=<%=saytk%>'>网站首页</a>

<%
rs.close
set rs=nothing
connshici.close
set connshici=Nothing
Call headsay()
%>
