<%
Function ExportPageInfo(ByRef rs,curpage,i,LinkFile)
Dim retval, j, pageNumber, BasePage
'i=rs.recordcount

retval = "第" & curpage & "页/总" & rs.pagecount & "页 " 
retval = retval & "本页" & i & "条/总" & rs.recordcount & "条 "

If curpage = 1 Then 
retval = retval & "首页 上一页 " 
Else 
retval = retval & "<a href='" & LinkFile & "page=1'>首页</a> <a href='" & LinkFile & "page=" & cstr(curpage - 1) & "'>上一页</a> " 
End If
If curpage = rs.pagecount Then 
retval = retval & "下一页 末页"
Else
retval = retval & "<a href='" & LinkFile & "page=" & cstr(curpage + 1) & "'>下一页</a> <a href='" & LinkFile & "page=" & cstr(rs.pagecount) & "'>末页</a>"
End if

retval = retval & "<br/>"
BasePage = (curpage \ 10) * 10
If BasePage > 0 Then retval = retval & " <a href='" & LinkFile & "page=" & (BasePage - 9) & "'><<</a>"
For j = 1 to 10
pageNumber = BasePage + j
If PageNumber > rs.pagecount Then Exit For
If pageNumber = Cint(curpage) Then
retval = retval & " <font color=''#FF0000''>" & pageNumber & "</font>"
Else
retval = retval & " <a href='" & LinkFile & "page=" & pageNumber & "'>" & pageNumber & "</a>"
End If
Next
If rs.pagecount > BasePage Then retval = retval & " <a href='" & LinkFile & "page=" & (BasePage + i) & "'>>></a>"

ExportPageInfo = retval
End Function
%>