Changeset 448
- Timestamp:
- Apr 12, 2010, 10:22:44 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/statistic.php
r410 r448 2 2 3 3 include('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']; 4 10 5 11 function ShowStatTable() … … 8 14 9 15 $LanguageId = LoadLanguageIdParameter(); 10 $BuildNumber = GetBuildNumber($ Config['Web']['GameVersion']);16 $BuildNumber = GetBuildNumber($_SESSION['StatVersion']); 11 17 12 18 $GroupListQuery = 'SELECT `Group`.* FROM `Group`'; … … 51 57 $Total += $Group['Total']; 52 58 } 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>'); 54 63 echo('</table>'); 55 64 } 56 65 57 66 ShowPage(); 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> '); 58 81 59 echo('<h3>Statistika dokončení překladů pro verzi '.$ Config['Web']['GameVersion'].'</h3><br/>Jazyk: <a href="statistic.php">Dohromady</a>');82 echo('<h3>Statistika dokončení překladů pro verzi '.$_SESSION['StatVersion'].'</h3><br/>Jazyk: <a href="statistic.php">Dohromady</a>'); 60 83 foreach($LanguageList as $Language) 61 84 if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>');
Note:
See TracChangeset
for help on using the changeset viewer.