Changeset 288 for trunk/dictionary.php


Ignore:
Timestamp:
Dec 22, 2009, 1:10:06 PM (14 years ago)
Author:
george
Message:
  • Upraveno: Vytovřena funkce pro podporu řazení tabulek. Různé tabulky načítané za databáze mají nyní v hlavičce možnost řazení sestupně/vzestupně podle dostupných sloupců.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dictionary.php

    r287 r288  
    223223  $PageList = GetPageList($DbRow[0]); 
    224224
    225   $sql_page = $sql.' '.$PageList['SQLLimit'];
    226 
    227225  echo($PageList['Output']);
    228   echo('<table width="98%" class="BaseTable">
    229     <tr><th>Angličtina</th>
    230     <th>'.$LanguageList[$_SESSION['language']]['Name'].'</th>
    231     <th>Popis</th><th>Překladatel</th>');
    232     if(Licence(LICENCE_USER)) echo('<th>Akce</th>');
    233     echo('</tr>');
     226 
     227  $TableColumns = array(
     228    array('Name' => 'Original', 'Title' => 'Angličtina'),
     229    array('Name' => 'Translated', 'Title' => $LanguageList[$_SESSION['language']]['Name']),
     230    array('Name' => 'Description', 'Title' => 'Popis'),
     231    array('Name' => 'UserName', 'Title' => 'Překladatel'),
     232  );
     233  if(Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce');
     234  $Order = GetOrderTableHeader($TableColumns, 'Original');
     235  echo('<table width="98%" class="BaseTable">');
     236  echo($Order['Output']);
     237
     238  $sql_page = $sql.$Order['SQL'].$PageList['SQLLimit'];
    234239  $ID = $Database->SQLCommand($sql_page);
    235240  while($Line = mysql_fetch_assoc($ID))
Note: See TracChangeset for help on using the changeset viewer.