Ignore:
Timestamp:
Dec 21, 2009, 1:19:39 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Třída TWebServer oddělena do samostatné jednotky.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DirectWeb/UHTMLControls.pas

    r88 r91  
    4949    Page := StrToInt(HandlerData.Request.Query.Values[PageIndexName]);
    5050
    51   Count := Round(TotalCount / ItemPerPage);
     51  Count := Trunc(TotalCount / ItemPerPage) + 1;
     52  if Page > Count - 1 then Page := Count - 1;
     53
    5254  Output := '';
    5355  if Count > 1 then
    5456  with HandlerData, Request do begin
    55     if Page > Count - 1 then Page := Count - 1;
    5657
    5758    if Page > 0 then begin
     
    6869    if PagesMax > Count - 1 then PagesMax := Count - 1;
    6970
     71    if PagesMin > 0 then Output := Output + ' .. ';
    7072    // Show page numbers
    7173    for I := PagesMin to PagesMax do begin
     
    7880      end;
    7981    end;
     82    if PagesMax < (Count - 1) then Output := Output + ' .. ';
    8083
    81     if PagesMax < (Count - 1) then Output := Output + ' .. ';
    8284    if Page < (Count - 1) then begin
    8385      Query.Values[PageIndexName] := IntToStr(Page + 1);
Note: See TracChangeset for help on using the changeset viewer.