Changeset 766 for trunk/Modules


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/Modules
Files:
3 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        }
Note: See TracChangeset for help on using the changeset viewer.