28,391
社区成员
发帖
与我相关
我的任务
分享
function pagecute(maxpage,thepages,viewpage,pageurl,pp)
pagecute=" <div style='float:left; heigth:17px; padding-left:15px; padding-right:30px; padding-top:1px; '>"&Common_Dict("页次")&":<font class='Yellow'>"&viewpage&"</font> of <font class='Yellow'>"&thepages&"</font> </div>"
if int(thepages)=0 then
pagecute=pagecute&"<div class='page_cute'>1</div><div class=""c""></div><br><br>"
exit function
end if
dim pn,pi,page_num,ppp,pl,pr
pi=1
ppp=pp\2
if pp mod 2 = 0 then ppp=ppp-1
pl=viewpage-ppp
pr=pl+pp-1
if pl<1 then
pr=pr-pl+1
pl=1
if pr>thepages then pr=thepages
end if
if pr>int(thepages) then
pl=pl+thepages-pr
pr=thepages
if pl<1 then pl=1
end if
if pl>1 then
pagecute=pagecute&" <div class='page_cute'><a href='"& pageurl &"' title='The first page'><font face=""webdings"">9</font></a></div> " & _
" <div class='page_cute'><a href='"& pageurl &"page="&pl-1&"' title='Previous page'><font face=""webdings"">7</font></a></div> "
end if
for pi=pl to pr
if cint(viewpage)=cint(pi) then
pagecute=pagecute&" <div class='page_cute'>" & pi & "</div> "
else
pagecute=pagecute&" <div class='page_cute'><a href='"& pageurl &"page="& pi &"' title='Page " & pi & "' >" & pi & "</a></div> "
end if
next
if pr<thepages then
pagecute=pagecute&" <div class='page_cute'><a href='"& pageurl &"page="&pi&"' title='Next page'><font face=""webdings"">8</font></a></div> " & _
" <div class='page_cute'><a href='"& pageurl &"page="& thepages &"' title='The last page'><font face=""webdings"">:</font></a></div> "
end if
pagecute=pagecute&"<div class=""c""></div><br><br>"
end function