home *** CD-ROM | disk | FTP | other *** search
/ 221.214.14.186 / 221.214.14.186.tar / 221.214.14.186 / zb / Notepad-zb / chkPage.inc < prev    next >
Text File  |  2005-12-26  |  491b  |  26 lines

  1. <%
  2. function getPageCount( pageCount, RecordCount, rcPerPage)
  3.     pageCount=RecordCount/rcPerPage
  4.     pageCount=int(pageCount)
  5.     if (RecordCount mod rcPerPage)>0 then
  6.         PageCount=PageCount +1
  7.     end if 
  8.     if pageCount<1 then
  9.         pageCount=1
  10.     end if
  11.     getPageCount=pageCount
  12. end function
  13.  
  14. function getPage(page,pageCount)
  15.     if page="" or not isNumeric(page) then
  16.         page=1
  17.     else
  18.         page=int(page)
  19.     end if
  20.     if page>pageCount then
  21.         page=pageCount
  22.     end if
  23.     getPage=page
  24. end function
  25.  
  26. %>