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 & " " end if strUrl=JoinChar(sfilename) if CurrentPage<2 then strTemp=strTemp & "首页 上一页 " Else strTemp=strTemp & "<a href='" & strUrl & "page=1'>首页</a> " strTemp=strTemp & "<a href='" & strUrl & "page=" & (CurrentPage-1) & "'>上一页</a> " end if