Changeset 423 for trunk/global.php


Ignore:
Timestamp:
Oct 10, 2012, 7:23:58 AM (12 years ago)
Author:
chronos
Message:
  • Přidáno: Volba pro zobrazení všech položek v tabulkách.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/global.php

    r396 r423  
    356356  $QueryItems = GetQueryStringArray($_SERVER['QUERY_STRING']);
    357357 
    358   $ItemPerPage = $System->Config['Web']['ItemsPerPage'];
    359   $Around = round($System->Config['Web']['VisiblePagingItems'] / 2);
    360358  $Result = '';
    361   $PageCount = floor($TotalCount / $ItemPerPage) + 1;
     359  if(array_key_exists('all', $QueryItems))
     360  {
     361    $PageCount = 1;
     362    $ItemPerPage = $TotalCount;   
     363  } else
     364  {
     365    $ItemPerPage = $System->Config['Web']['ItemsPerPage'];
     366    $Around = round($System->Config['Web']['VisiblePagingItems'] / 2);
     367    $PageCount = floor($TotalCount / $ItemPerPage) + 1;
     368  }
    362369 
    363370  if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 0;
     
    405412    }
    406413  }
     414  $QueryItems['all'] = '1';
     415  if($PageCount > 1) $Result.= '<a href="?'.SetQueryStringArray($QueryItems).'">Vše</a>';
     416 
    407417  $Result = '<div style="text-align: center">'.$Result.'</div>';
    408418  return(array('SQLLimit' => ' LIMIT '.$CurrentPage * $ItemPerPage.', '.$ItemPerPage,
Note: See TracChangeset for help on using the changeset viewer.