Changeset 766


Ignore:
Timestamp:
Jan 27, 2014, 10:28:05 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Table in download page made sortable with paging support.
  • Modified: Translation texts updated.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Download/Download.php

    r742 r766  
    3232        function ShowFiles()
    3333        {
    34     $this->Title = T('Download');               
    3534    $fileslink = $this->System->Link('/files');
    3635$Output = '<h3>Doplňky pro klienta</h3>'.
     
    7978        }
    8079       
    81         function ShowDownload() {
    82           global $System;
     80        function ShowDownload()
     81        {
    8382    $Output = '<h3>Stažení češtiny</h3><br />';
    8483   
     
    8988    $Output .= '<br /><br />';
    9089   
    91                 $Output .= '<table class="BaseTable">';
    92                 $Output .= '<tr><th>Stáhnout</th><th>Název</th><th>Datum vytvoření</th><th>Popis</th></tr>';
    93                 $DbRows = $this->System->Database->query('SELECT `ClientVersion`.`Version` as Version, `Export`.`Id`,`Export`.`ClientVersion`,`Export`.`OutputType`,`Export`.`Title`,`Export`.`Description` FROM `Export` JOIN `ClientVersion` as `ClientVersion` ON `ClientVersion`.`Id`=`Export`.`ClientVersion` WHERE `Featured`=1 ORDER BY `ClientVersion`.`BuildNumber` DESC');
    94       while ($DbExport = $DbRows->fetch_assoc()) {
    95       //  echo $DbExport['BuildNumber'].'<br />';
     90    $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `Featured`=1');
     91    $DbRow = $DbResult->fetch_row();
     92    $PageList = GetPageList($DbRow[0]);   
     93
     94    $Output .= $PageList['Output'];
     95    $TableColumns = array(
     96      array('Name' => 'Id', 'Title' => T('Download')),
     97      array('Name' => 'Title', 'Title' => T('Name2')),
     98      array('Name' => 'TimeCreate', 'Title' => T('Creation date')),
     99      array('Name' => 'Description', 'Title' => T('Description')),
     100    );   
     101    $Order = GetOrderTableHeader($TableColumns, 'Id', 1);
     102    $Output .= '<table class="BaseTable">'.
     103      $Order['Output'];                 
     104        $DbRows = $this->Database->query('SELECT `ClientVersion`.`Version` AS `Version`, '.
     105      '`Export`.`Id`, `Export`.`ClientVersion`, `Export`.`OutputType`, `Export`.`Title`, '.
     106      '`Export`.`Description` FROM `Export` '.
     107      'JOIN `ClientVersion` as `ClientVersion` ON `ClientVersion`.`Id`=`Export`.`ClientVersion` '.
     108      'WHERE `Featured`=1 '.$Order['SQL'].$PageList['SQLLimit']);
     109    while ($DbExport = $DbRows->fetch_assoc())
     110    {
    96111        $ExportId = $DbExport['Id'];
    97112                   
    98                     $filename = $System->Config['Web']['TempFolder'].'Export/'.$ExportId.'/'.'Instalace_CzechWoW_'.$DbExport['Version'].'.exe';
     113                    $filename = $this->System->Config['Web']['TempFolder'].'Export/'.$ExportId.'/'.'Instalace_CzechWoW_'.$DbExport['Version'].'.exe';
    99114                           
    100115                          if ($DbExport['OutputType'] == 10)
    101           $Output .= '<tr><td><a href="'.$System->Link('/'.$filename).'">CzechWoW_'.$DbExport['Version'].'.exe</a><br /> <a href="'.$System->Link('/export/?Action=View&amp;ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>';
     116          $Output .= '<tr><td><a href="'.$this->System->Link('/'.$filename).
     117            '">CzechWoW_'.$DbExport['Version'].'.exe</a><br /> <a href="'.
     118            $this->System->Link('/export/?Action=View&amp;ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>';
    102119        else
    103           $Output .= '<tr><td><a href="'.$System->Link('/export/?Action=View&amp;ExportId='.$ExportId.'&amp;Tab=7').'">Exportovat</a><br /> <a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>';
     120          $Output .= '<tr><td><a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.
     121            $ExportId.'&amp;Tab=7').'">Exportovat</a><br /> <a href="'.
     122            $this->System->Link('/export/?Action=View&amp;ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>';
    104123                               
    105124        $Output .= '<td>'.$DbExport['Title'].'</td>'; //.'<td>'.$DbExport['ClientVersion'].'</td>';
     
    108127          $Output .= '<td>'.date('d.m.y H:i',filemtime($filename)).'</td>';
    109128        else
    110           $Output .= '<td></td>';
     129          $Output .= '<td>&nbsp;</td>';
    111130
    112                         //              '<td>'.$Export['OutputType'].'</td>'.
    113131                                        $Output .=
    114132                                        '<td>'.str_replace("\n", '<br />',$DbExport['Description']).'</td>'.
    115 //                                      '<td><a href="'.$this->System->Link('/export/?Action=View&amp;ExportId='.$ExportId).'">Export '.$ExportId.'</a></td>'.
    116133          '</tr>';
    117       }
    118                 $Output .= '</table>';
    119      
    120    
     134    }
     135    $Output .= '</table>'.
     136      $PageList['Output'];
     137       
    121138    return($Output);
    122139  }
    123140       
    124         function Show() {
     141        function Show()
     142        {
     143                $this->Title = T('Download');
    125144          $Output = '';
    126145    if (isset($_GET['Files'])) $Output .= $this->ShowFiles();
     
    128147 
    129148    return($Output);
    130   }
    131        
     149  }     
    132150}
    133151   
  • trunk/Modules/Referrer/Referrer.php

    r637 r766  
    196196  function Show()
    197197  {
    198         $this->Title = T('Banners');
     198        $this->Title = T('Promotion');
    199199    if(array_key_exists('action', $_GET))
    200200    {
  • trunk/Modules/Server/Server.php

    r639 r766  
    3333                parent::__construct($System);
    3434          $this->Table = 'Server';
    35           $this->TableSQL = 'SELECT `Name`, `URL`, `Parts`, `XPRate`, `GameplayStyle`, '.
    36       '`ClientVersion`.`Version` AS `Version` FROM `Server` '.
     35          $this->TableSQL = 'SELECT `Server`.`Id`, `Name`, `URL`, `Parts`, `XPRate`, `GameplayStyle`, `Description`, `CheckIP`, `CheckPort`, '.
     36      '`ClientVersion`.`Version` AS `ClientVersion` FROM `Server` '.
    3737      'LEFT JOIN `ClientVersion` ON `ClientVersion`.`Id` = `Server`.`ClientVersion`';
    3838          $this->Definition = array(
    39             'Name' => array('Type' => 'String', 'Title' => T('Name')),
    40       'URL' => array('Type' => 'URL', 'Title' => T('URL')),
    41       'Parts' => array('Type' => 'String', 'Title' => T('Translated')),
    42       'XPRate' => array('Type' => 'String', 'Title' => T('XP rate')),
    43       'GameplayStyle' => array('Type' => 'String', 'Title' => T('Style')),
    44       'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version')),     
     39            'Name' => array('Type' => 'String', 'Title' => T('Name'), 'InList' => true),
     40      'URL' => array('Type' => 'URL', 'Title' => T('URL'), 'InList' => true),
     41      'Parts' => array('Type' => 'String', 'Title' => T('Translated'), 'InList' => true),
     42      'XPRate' => array('Type' => 'String', 'Title' => T('XP rate'), 'InList' => true),
     43      'GameplayStyle' => array('Type' => 'String', 'Title' => T('Style'), 'InList' => true),
     44      'ClientVersion' => array('Type' => 'String', 'Title' => T('Client version'), 'InList' => true),     
     45      'Description' => array('Type' => 'Text', 'Title' => T('Description'), 'InList' => false),
     46      'CheckIP' => array('Type' => 'Text', 'Title' => T('Online check IP'), 'InList' => false),
     47      'CheckPort' => array('Type' => 'Text', 'Title' => T('Online check port'), 'InList' => false),
    4548          );           
    4649        }
  • trunk/includes/Version.php

    r765 r766  
    66// and system will need database update.
    77
    8 $Revision = 766; // Subversion revision
     8$Revision = 767; // Subversion revision
    99$DatabaseRevision = 748; // Database structure revision
    1010$ReleaseTime = '2014-01-27';
  • trunk/locale/cs.php

    r748 r766  
    4747      'New user registration' => 'Registrace nového uživatele',
    4848      'Translators' => 'Překladatelé',
     49      'Name2' => 'Název',
    4950      'Name' => 'Jméno',
    5051      'Password' => 'Heslo',
     
    146147      'New item' => 'Nová položka',
    147148      'More information' => 'Více informací',
    148       'Build number' => '',
     149      'Build number' => 'Datum sestavení',
    149150      'All versions list' => 'Seznam všech verzí',
    150151      'Forum' => 'Fórum',
     
    153154      'New Forum Message' => 'Nová zpráva v vláknu',
    154155      'New thread' => 'Nové vlákno',
     156      'Creation date' => 'Datum vytvoření',
     157      'Logs' => 'Záznamy',
     158      'Online check IP' => 'Zkontroloat IP online',
     159      'Online check port' => 'Zkontroloat port online',
    155160      'There are servers listed which are in fact offering translated game. '.
    156161    'There is resoluted if translation is offered either on client side, on server side or both. '.
    157     'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.' => 
    158 'Zde jsou uvedeny servery, které opravdu nabízí přeloženou hru. Rozlišuje se, jestli překlad je nabízen na straně klienta, serveru nebo obou.'.
     162    'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.' =>
     163    'Zde jsou uvedeny servery, které opravdu nabízí přeloženou hru. Rozlišuje se, jestli překlad je nabízen na straně klienta, serveru nebo obou.'.
    159164'Pojem "Český server" neznamená, že server je provozovaný čechy, ale že je možné hrát v češtině',
     165      'Last translations' => 'Poslední překlady',
     166      'View' => 'Zobrazit',
     167      'Item' => 'Položka',
     168      'Edit' => 'Upravit',
     169      'List' => 'Seznam',
    160170    );
    161171  }
  • trunk/locale/en.php

    r748 r766  
    153153      'New Forum Message' => '',
    154154      'New thread' => '',
     155      'Name2' => '',
     156      'Creation date' => '',
     157      'Logs' => '',
     158      'Online check IP' => '',
     159      'Online check port' => '',
    155160      'There are servers listed which are in fact offering translated game. '.
    156161    'There is resoluted if translation is offered either on client side, on server side or both. '.
    157162    'Term "Czech server" doesn\'t mean that server is operated by Czech people but that it is possible to play in Czech.' => '',
     163      'Last translations' => '',
     164      'View' => '',
     165      'Item' => '',
     166      'Edit' => '',
     167      'List' => '',
    158168    );
    159169  }
Note: See TracChangeset for help on using the changeset viewer.