87,993
社区成员




<%
Function pagebar( pagecount,page )
Dim i,ppage,str
str=" "
If request.querystring("page")<>"" Then
page=request.querystring("page")
End If
If CInt(page)=1 Then
str=str&"<font color=""#FF7300""><b>1</b></font> "
Else
str=str&"<a href=""?page=1"">1</a> "
End If
For i=0 To 3
ppage=CInt(page)-3+i
If i=0 And CInt(ppage)>2 Then
str=str&"... "
End If
If CInt(ppage)>1 And CInt(ppage)<CInt(pagecount) Then
If i=3 Then
str=str&"<b><font color=""#FF7300"">"&ppage&"</font></b> "
Else
str=str&"<a href=""?page="&ppage&""">"&ppage&"</a> "
End If
End If
Next
For i=1 To 3
ppage=CInt(page)+i
If CInt(ppage)>1 And CInt(ppage)<Cint(pagecount) Then
str=str&"<a href=""?page="&ppage&""">"&ppage&"</a> "
End If
If i=3 And CInt(ppage)<CInt(pagecount)-1 Then
str=str&"... "
End If
Next
If CInt(pagecount)<>1 Then
If CInt(page)=CInt(pagecount) Then
str=str&"<font color=""#FF7300""><b>"&pagecount&"</b></font> "
Else
str=str&"<a href=""?page="&pagecount&""">"&pagecount&"</a> "
End If
End If
str=str&"<br><a href=""?page=1"">首页</a> "
If CInt(page)>1 Then
str=str&"<a href=""?page="&page-1&""">上一页</a> "
Else
str=str&"上一页 "
End If
If CInt(page)<CInt(pagecount) Then
str=str&"<a href=""?page="&page+1&""">下一页</a> "
Else
str=str&"下一页 "
End If
str=str&"<a href=""?page="&pagecount&""">尾页</a> "
pagebar=str
End Function
%>
<%=pagebar(20,2)%>