<%
set rs=Server.CreateObject("Adodb.RecordSet")
sqlstr="select * from data" '精品推荐
rs.open sqlstr,conn,1,3
link="CustomerView.asp?SearchText="&SearchText&"&" '翻页
if rs.eof<>true then
if not isempty(request("page")) then
pagecount=cint(request("page"))
else
pagecount=1
end if
rs.pagesize=10
if pagecount>rs.pagecount or pagecount<=0 then
pagecount=1
end if
rs.AbsolutePage=pagecount
if pagecount=1 then
page_start=1
end if
if pagecount*rs.pagesize=>rs.recordcount then
page_end=rs.recordcount
end if
i=0
end if
%>
----------------------------------------------------------------------------
<%
sub Page '分页
response.write"<form name='go2to' form method=Post action="&link&">"
if pagecount=1 then
response.write "首页 上一页 "
else
response.write "<a class=title href="&link&"page=1>首页</a> "
response.write "<a class=title href="&link&"page="&cstr(pagecount-1)&">上一页</a> "
end if
if rs.PageCount-pagecount<1 then
response.write "下一页 尾页"
else
response.write "<a class=title href="&link&"page="&cstr(pagecount+1)&">下一页</a> "
response.write "<a class=title href="&link&"page="&cstr(rs.PageCount)&"><font class=ver>尾页</font></a>"
end if
response.write " 页次:"&pagecount&"/"&rs.pagecount&"页"
response.write "转到第<input class='inputnormal' type='text' name='page' size=2 maxLength=3 style='font-size: 9pt; color:#00006A; position: relative; height: 18' value="&PageCount&">页 "
response.write ("<input type='button' name='GO' value='GO' onclick=check('"&link&"')>")
response.Write "</form>"
end sub
%>