SUB pageUrl(allPages,page,pUrl,para,total,shuliangci)
if page > 0 and allPages > 0 then
Dim eUrl, iPages1, iPages2, txt, txts, i
response.write "<table align=""center"" border=""0"" cellpadding=""0"" cellspacing=""0""><tr><td height=""26"">"
Response.Write("<center><strong>共 <font color=#ff0000>"&allPages&"</font> 页 总共 <font color=#ff0000>"&total&"</font> "&shuliangci&"</strong> ")
'txts = Request.ServerVariables("URL")
'txts = left(txts,instrrev(txts,"/",len(txts))-1)
'eUrl = "http://" & Request.ServerVariables("server_name") & txts
if page>=10 then
iPages2=page+8
iPages1=Page-1
if iPages2>allPages then
iPages2=allPages
iPages1=allpages-9
end if
else
if allPages>10 then
iPages2=10
else
iPages2=allPages
END IF
iPages1=1
end if
For i=iPages1 to iPages2
txt = ""
txt = txt & "<strong><a href=" & pUrl & para & "page="&i &" target=""_self"">"
if i = Cint(Page) then txt = txt & "<font color=""#ff0000"">"
txt = txt & (i)
if i = Cint(Page) then txt = txt & "</font>"
txt = txt & "</a></strong> "
Response.Write(txt)
Next
Response.Write(" <strong>")
IF int(page)<=1 then
Response.write("第一页 ")
Response.Write("上一页 ")
If allpages>1 Then
response.write "<a href=" & pUrl & para & "page=2 target=""_self"">下一页</A>"
Else
response.write "下一页"
End if
Response.write(" <a href=" & pUrl & para & "page="&allpages&" target=""_self"">最后一页</a>")
ELSEIF int(page) >= allPages then
Response.write("<a href=" & pUrl & para & "page=1 target=""_self"">第一页</a> ")
Response.Write("<a href=" & pUrl & para & "page="&(allPages-1)&" target=""_self"">上一页</A> 下一页")
Response.write(" 最后一页")
ELSE
Response.write("<a href=" & pUrl & para &"page=1 target=""_self"">第一页</a> ")
Response.Write("<a href=" & pUrl & para &"page="&(page-1)&" target=""_self"">上一页</A> <a href=" & pUrl & para & "page="&page+1&">下一页</A>")
Response.write(" <a href=" & pUrl & para & "page="&allpages&" target=""_self"">最后一页</a>")
END if
Response.Write"</strong> </center>"
response.write "</td></tr></table>"
end if
END sub
if page > 0 and allPages > 0 then
Dim eUrl, iPages1, iPages2, txt, txts, i
response.write "<table align=""center"" border=""0"" cellpadding=""0"" cellspacing=""0""><tr><td height=""26"">"
Response.Write("<center><strong>共 <font color=#ff0000>"&allPages&"</font> 页 总共 <font color=#ff0000>"&total&"</font> "&shuliangci&"</strong> ")
'txts = Request.ServerVariables("URL")
'txts = left(txts,instrrev(txts,"/",len(txts))-1)
'eUrl = "http://" & Request.ServerVariables("server_name") & txts
if page>=10 then
iPages2=page+8
iPages1=Page-1
if iPages2>allPages then
iPages2=allPages
iPages1=allpages-9
end if
else
if allPages>10 then
iPages2=10
else
iPages2=allPages
END IF
iPages1=1
end if
For i=iPages1 to iPages2
txt = ""
txt = txt & "<strong><a href=" & pUrl & para & "page="&i &" target=""_self"">"
if i = Cint(Page) then txt = txt & "<font color=""#ff0000"">"
txt = txt & (i)
if i = Cint(Page) then txt = txt & "</font>"
txt = txt & "</a></strong> "
Response.Write(txt)
Next
Response.Write(" <strong>")
IF int(page)<=1 then
Response.write("第一页 ")
Response.Write("上一页 ")
If allpages>1 Then
response.write "<a href=" & pUrl & para & "page=2 target=""_self"">下一页</A>"
Else
response.write "下一页"
End if
Response.write(" <a href=" & pUrl & para & "page="&allpages&" target=""_self"">最后一页</a>")
ELSEIF int(page) >= allPages then
Response.write("<a href=" & pUrl & para & "page=1 target=""_self"">第一页</a> ")
Response.Write("<a href=" & pUrl & para & "page="&(allPages-1)&" target=""_self"">上一页</A> 下一页")
Response.write(" 最后一页")
ELSE
Response.write("<a href=" & pUrl & para &"page=1 target=""_self"">第一页</a> ")
Response.Write("<a href=" & pUrl & para &"page="&(page-1)&" target=""_self"">上一页</A> <a href=" & pUrl & para & "page="&page+1&">下一页</A>")
Response.write(" <a href=" & pUrl & para & "page="&allpages&" target=""_self"">最后一页</a>")
END if
Response.Write"</strong> </center>"
response.write "</td></tr></table>"
end if
END sub