if TotalNumber=0 or MaxPerPage=0 or isNull(MaxPerPage) then ShowPage="" exit function end if if totalnumber mod maxperpage=0 then TotalPage= totalnumber \&;maxperpage Else TotalPage= totalnumber \&;maxperpage+1 end if if CurrentPage>TotalPage then CurrentPage=TotalPage
strTemp= "table align='center'>tr>td>" if ShowTotal=true then strTemp=strTemp "共 b>" totalnumber "/b> " strUnit "nbsp;nbsp;" end if strUrl=JoinChar(sfilename) if CurrentPage2 then strTemp=strTemp "首页 上一页nbsp;" Else strTemp=strTemp "a href='" strUrl "page=1'>首页/a>nbsp;" strTemp=strTemp "a href='" strUrl "page=" (CurrentPage-1) "'>上一页/a>nbsp;" end if
if CurrentPage>=TotalPage then strTemp=strTemp "下一页 尾页" Else strTemp=strTemp "a href='" strUrl "page=" (CurrentPage+1) "'>下一页/a>nbsp;" strTemp=strTemp "a href='" strUrl "page=" TotalPage "'>尾页/a>" end if strTemp=strTemp "nbsp;页次:strong>font color=red>" CurrentPage "/font>/" TotalPage "/strong>页 " strTemp=strTemp "nbsp;b>" maxperpage "/b>" strUnit "/页" if ShowAllPages=True then strTemp=strTemp "nbsp;nbsp;转到第input type='text' name='page' size='3' maxlength='5' value='" CurrentPage "' onKeyPress=""if (event.keyCode==13) window.location='" strUrl "page=" "'+this.value;""'>页" 'strTemp = strTemp "nbsp;Input type=""button"" onClick=""window.location.href='" strUrl "page='+document.all.page.value;"" name=button1 value=GO >" end if strTemp=strTemp "/td>/tr>/table>" ShowPage=strTemp end function