<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/conn.asp" -->
<%
if request.form("serch")<>""then
serch=request.form("serch")
else
serch=request.QueryString("serch")
end if
%>
<%
search=request("serch")
if search="" then
response.Write"<script>alert('对不起,请输入关键字');location='../index.asp'</script>"
response.End()
end if
set rs=server.CreateObject("adodb.recordset")
sql="select * from doc where bt like '%"&search&"%'or nr like '%"&search&"%'"
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write"<script>alert('没有搜索到相关信息');location='../index.asp'</script>"
response.End()
else
%>
<%
rs.pagesize=5
page=clng(request("page"))
if page<1 then page=1
rs.absolutepage=page
for i=1 to rs.pagesize
%>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="30" style="border-bottom:dashed 1px #999999"> 首页>>站内搜索</td>
</tr>
<tr>
<td height="30"><div align="center">·[<%=rs("bt")%>][<%=rs("nr")%>][<%=rs("tjtime")%>]</div></td>
</tr><%rs.movenext
if rs.eof then exit for
next
end if
%>
<tr>
<td height="30"></td>
</tr>
<tr>
<td height="30"><div align="right"><a href="../index.asp">[返回首页]</a></div></td>
</tr>
</table>
<p>
<%
if page<>1 then
%>
<a href=<%=path%>?page=1&serch=<%=serch%>>第一页</a>
<a href=<%=path%>?page=<%=(page-1)%>&serch=<%=serch%>>上一页</a>
<%end if%>
<%
if page<>rs.pagecount then
%>
<a href=<%=path%>?page=<%page+1%>&serch=<%=serch%>>下一页</a>
<a href=<%=path%>?page=<%=rs.pagecount%>&serch=<%=serch%>>最后一页</a>
<%
end if
%>
</p>