Changeset 448 for trunk/statistic.php


Ignore:
Timestamp:
Apr 12, 2010, 10:22:44 AM (15 years ago)
Author:
maron
Message:

Možnost výběru verze pro statistiku

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/statistic.php

    r410 r448  
    22
    33include('includes/global.php');
     4
     5  if (array_key_exists('Version',$_GET))
     6    $_SESSION['StatVersion'] = $_GET['Version'];
     7  else
     8    if (!array_key_exists('StatVersion',$_SESSION))
     9      $_SESSION['StatVersion'] = $Config['Web']['GameVersion'];
    410
    511function ShowStatTable()
     
    814 
    915  $LanguageId = LoadLanguageIdParameter();
    10   $BuildNumber = GetBuildNumber($Config['Web']['GameVersion']);
     16  $BuildNumber = GetBuildNumber($_SESSION['StatVersion']);
    1117 
    1218  $GroupListQuery = 'SELECT `Group`.* FROM `Group`';
     
    5157    $Total += $Group['Total'];
    5258  }
    53   echo('<tr><td><strong>Celkem</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, round($Translated / $Total * 100, 2)).'</strong></td></tr>');
     59  if ($Total <> '')
     60    echo('<tr><td><strong>Celkem</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, round($Translated / $Total * 100, 2)).'</strong></td></tr>');
     61  else
     62    echo('<tr><td><strong>Celkem</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, 0).'</strong></td></tr>');
    5463  echo('</table>');
    5564}
    5665
    5766ShowPage();
     67 
     68  $ConfigVersion = $Config['Web']['GameVersion'];
     69  echo ('Zobrazit statistiku pro verzi: <br />');
     70  echo ('<a href="?Version=2.4.3">2.4.3</a> ');
     71  $DbResult = $Database->SQLCommand('SELECT Version, Title FROM `ClientVersion` WHERE BuildNumber > 8209 AND Title <> "" ORDER BY Version');
     72  while($DbRow = mysql_fetch_assoc($DbResult))
     73  {   
     74          if ($DbRow['Version'] == $Config['Web']['GameVersion']) $ConfigVersion = false;
     75          echo ('<a href="?Version='.$DbRow['Version'].'" Title="'.$DbRow['Title'].'">'.$DbRow['Version'].'</a> ');
     76  }
     77  $DbResult = $Database->SQLCommand('SELECT MAX(Version) as max FROM `ClientVersion`');
     78  $DbRow = mysql_fetch_assoc($DbResult);
     79  if (($ConfigVersion <> false) and ($ConfigVersion <> $DbRow['max'])) echo ('<a href="?Version='.$ConfigVersion.'">'.$ConfigVersion.'</a> ');
     80  echo ('<a href="?Version='.$DbRow['max'].'">'.$DbRow['max'].'</a> ');
    5881
    59 echo('<h3>Statistika dokončení překladů pro verzi '.$Config['Web']['GameVersion'].'</h3><br/>Jazyk: <a href="statistic.php">Dohromady</a>');
     82echo('<h3>Statistika dokončení překladů pro verzi '.$_SESSION['StatVersion'].'</h3><br/>Jazyk: <a href="statistic.php">Dohromady</a>');
    6083foreach($LanguageList as $Language)
    6184  if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>');
Note: See TracChangeset for help on using the changeset viewer.