Public Sub Pagination2(ByVal PageCount As Integer, Optional ByVal UrlStr As String = "")
Dim WzPage, PageNum As Integer
If UrlStr = "" Then
If Len(Request("Page")) <> 0 Then
WzPage = CLng(Request("Page"))
Else
WzPage = 1
End If
If WzPage <= 0 Then WzPage = 1
PageNum = (WzPage \ 10) * 10 + 1
If WzPage Mod 10 = 0 Then PageNum = (WzPage \ 10) * 10 - 9
Response.Write("<font face=""Webdings"">")
Response.Write("<a href=""?Page=1"" title=""首頁"">9</a>")
Response.Write("<a href=""?Page=" & PageNum - 1 & """ title=""前十頁"">7</a>")
Response.Write("</font><font face=""Arial"">")
For PageNum = PageNum To PageNum + 9
If PageNum = WzPage Then
Response.Write("<b>")
Response.Write(" [" & PageNum & "] ")
Response.Write("</b>")
Else
Response.Write(" <a href=""?Page=" & PageNum & """>")
Response.Write("" & PageNum & "")
Response.Write("</a> ")
End If
If PageNum >= PageCount Then Exit For
Next
Response.Write("</font><font face=""Webdings"">")
Response.Write("<a href=""?Page=" & PageNum & """ title=""後十頁"">8</a>")
Response.Write("<a href=""?Page=" & PageCount & """ title=""尾頁"">:</a>")
Response.Write("</font>")
Else
If Len(Request("Page")) <> 0 Then
WzPage = CLng(Request("Page"))
Else
WzPage = 1
End If
If WzPage <= 0 Then WzPage = 1
PageNum = (WzPage \ 10) * 10 + 1
If WzPage Mod 10 = 0 Then PageNum = (WzPage \ 10) * 10 - 9
Response.Write("<font face=""Webdings"">")
Response.Write("<a href=""?" & UrlStr & "&Page=1"" title=""首頁"">9</a>")
Response.Write("<a href=""?" & UrlStr & "&Page=" & PageNum - 1 & """ title=""前十頁"">7</a>")
Response.Write("</font><font face=""Arial"">")
For PageNum = PageNum To PageNum + 9
If PageNum = WzPage Then
Response.Write("<b>")
Response.Write(" [" & PageNum & "] ")
Response.Write("</b>")
Else
Response.Write(" <a href=""?" & UrlStr & "&Page=" & PageNum & """>")
Response.Write("" & PageNum & "")
Response.Write("</a> ")
End If
If PageNum >= PageCount Then Exit For
Next
Response.Write("</font><font face=""Webdings"">")
Response.Write("<a href=""?" & UrlStr & "&Page=" & PageNum & """ title=""後十頁"">8</a>")
Response.Write("<a href=""?" & UrlStr & "&Page=" & PageCount & """ title=""尾頁"">:</a>")
Response.Write("</font>")
End If
End Sub
Dim WzPage, PageNum As Integer
If UrlStr = "" Then
If Len(Request("Page")) <> 0 Then
WzPage = CLng(Request("Page"))
Else
WzPage = 1
End If
If WzPage <= 0 Then WzPage = 1
PageNum = (WzPage \ 10) * 10 + 1
If WzPage Mod 10 = 0 Then PageNum = (WzPage \ 10) * 10 - 9
Response.Write("<font face=""Webdings"">")
Response.Write("<a href=""?Page=1"" title=""首頁"">9</a>")
Response.Write("<a href=""?Page=" & PageNum - 1 & """ title=""前十頁"">7</a>")
Response.Write("</font><font face=""Arial"">")
For PageNum = PageNum To PageNum + 9
If PageNum = WzPage Then
Response.Write("<b>")
Response.Write(" [" & PageNum & "] ")
Response.Write("</b>")
Else
Response.Write(" <a href=""?Page=" & PageNum & """>")
Response.Write("" & PageNum & "")
Response.Write("</a> ")
End If
If PageNum >= PageCount Then Exit For
Next
Response.Write("</font><font face=""Webdings"">")
Response.Write("<a href=""?Page=" & PageNum & """ title=""後十頁"">8</a>")
Response.Write("<a href=""?Page=" & PageCount & """ title=""尾頁"">:</a>")
Response.Write("</font>")
Else
If Len(Request("Page")) <> 0 Then
WzPage = CLng(Request("Page"))
Else
WzPage = 1
End If
If WzPage <= 0 Then WzPage = 1
PageNum = (WzPage \ 10) * 10 + 1
If WzPage Mod 10 = 0 Then PageNum = (WzPage \ 10) * 10 - 9
Response.Write("<font face=""Webdings"">")
Response.Write("<a href=""?" & UrlStr & "&Page=1"" title=""首頁"">9</a>")
Response.Write("<a href=""?" & UrlStr & "&Page=" & PageNum - 1 & """ title=""前十頁"">7</a>")
Response.Write("</font><font face=""Arial"">")
For PageNum = PageNum To PageNum + 9
If PageNum = WzPage Then
Response.Write("<b>")
Response.Write(" [" & PageNum & "] ")
Response.Write("</b>")
Else
Response.Write(" <a href=""?" & UrlStr & "&Page=" & PageNum & """>")
Response.Write("" & PageNum & "")
Response.Write("</a> ")
End If
If PageNum >= PageCount Then Exit For
Next
Response.Write("</font><font face=""Webdings"">")
Response.Write("<a href=""?" & UrlStr & "&Page=" & PageNum & """ title=""後十頁"">8</a>")
Response.Write("<a href=""?" & UrlStr & "&Page=" & PageCount & """ title=""尾頁"">:</a>")
Response.Write("</font>")
End If
End Sub