Ignore:
Timestamp:
Oct 21, 2009, 10:24:50 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Chybějící include v souborech.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/Base/Table.php

    r78 r80  
    22
    33include_once(dirname(__FILE__).'/Types/Type.php');
     4include_once(dirname(__FILE__).'/Types/Module.php');
    45
    5 class Table
     6class Table extends Module
    67{
    78  var $Id;
     
    1314  var $TotalRowCount;
    1415 
    15   function __construct($FormClass)
     16  function __construct($FormClass, $System)
    1617  {
     18    parent::__construct($System);
    1719    $this->Definition = $FormClass;   
    1820    $this->QueryParameters = array();
     
    3941  function Show()
    4042  {
    41     global $Config;
    42 
    4343    $this->CheckOrder();
    4444    $Header = array();
     
    6161    $Html = new Html();
    6262    $Output = $Html->Table($Table, 'WideTable');
    63     $Output .= '<div class="Pager">'.$Html->PageList('Page', $this->Page, $this->TotalRowCount, $Config['Web']['TableRowPerPage']).'</div>';
     63    $Output .= '<div class="Pager">'.$Html->PageList('Page', $this->Page, $this->TotalRowCount, $this->Config['Web']['TableRowPerPage']).'</div>';
    6464    return($Output);
    6565  } 
     
    6767  function LoadValuesFromDatabase($Database)
    6868  {   
    69     global $Config;
    70    
    7169    $this->CheckOrder();
    7270    $OrderType = array('ASC', 'DESC');
     
    8583    if(array_key_exists('Page', $_GET)) $this->Page = $_GET['Page']; else $this->Page = 0;
    8684    if($this->Page > ($this->TotalRowCount / $Config['Web']['TableRowPerPage'])) $this->Page = 0;
    87     $DbResult = $Database->query('SELECT * FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $Config['Web']['TableRowPerPage']).', '.$Config['Web']['TableRowPerPage']);
     85    $DbResult = $Database->query('SELECT * FROM '.$Table.' AS T ORDER BY T.'.$_GET['Column'].' '.$OrderType[$_GET['Order']].' LIMIT '.($this->Page * $this->Config['Web']['TableRowPerPage']).', '.$this->Config['Web']['TableRowPerPage']);
    8886    while($DbRow = $DbResult->fetch_assoc())
    8987    {
Note: See TracChangeset for help on using the changeset viewer.