Changeset 826 for trunk/Modules/Translation/Progress.php
- Timestamp:
- Mar 1, 2015, 3:38:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Translation/Progress.php
r816 r826 19 19 { 20 20 $Query .= 'SELECT (SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 21 22 23 24 25 26 27 28 29 21 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 22 'WHERE (`Complete` = 1) '.$LanguageFilter.' '. 23 'AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 24 ') AS `C1`) AS `Translated`, '. 25 '(SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 26 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 27 'WHERE (`Language` = '.$this->System->Config['OriginalLanguage'].') '. 28 'AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 29 ') AS `C2`) AS `Total`, "'.$DbRow['Name'].'" AS `Name` UNION '; 30 30 } 31 31 $Query = substr($Query, 0, - 6); … … 38 38 $Output .= '<table class="BaseTable">'; 39 39 $TableColumns = array( 40 41 42 43 40 array('Name' => 'Name', 'Title' => 'Jméno'), 41 array('Name' => 'Translated', 'Title' => 'Přeložených'), 42 array('Name' => 'Total', 'Title' => 'Anglických'), 43 array('Name' => 'Percent', 'Title' => 'Procenta'), 44 44 ); 45 45 … … 67 67 { 68 68 $this->Title = T('Progress'); 69 $LanguageList = GetLanguageList();69 $LanguageList = GetLanguageList(); 70 70 71 if(array_key_exists('Version', $_GET)) $_SESSION['StatVersion'] = $_GET['Version']; 72 if(!array_key_exists('StatVersion', $_SESSION)) 73 { 74 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->PreferredVersionGame != '')) 75 { 76 $_SESSION['StatVersion'] = $this->System->User->PreferredVersionGame; 77 } else 78 $_SESSION['StatVersion'] = $this->System->Config['Web']['GameVersion']; 79 } 71 if(array_key_exists('Version', $_GET)) $_SESSION['StatVersion'] = $_GET['Version']; 72 if(!array_key_exists('StatVersion', $_SESSION)) 73 { 74 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->PreferredVersionGame != '')) 75 { 76 $_SESSION['StatVersion'] = $this->System->User->PreferredVersionGame; 77 } else { 78 $_SESSION['StatVersion'] = $this->System->Config['Web']['GameVersion']; 79 } 80 } 80 81 81 if(!isset($_SESSION['language'])) 82 { 83 if($this->System->User->Licence(LICENCE_USER)) 84 { 85 $_SESSION['language'] = $this->System->User->Language; 86 } else $_SESSION['language'] = ''; 87 } 88 if(array_key_exists('language', $_GET)) { 89 if($_GET['language'] == '') $_SESSION['language'] = ''; 90 else { 91 $_SESSION['language'] = $_GET['language'] * 1; 82 if(!isset($_SESSION['language'])) 83 { 84 if($this->System->User->Licence(LICENCE_USER)) 85 { 86 $_SESSION['language'] = $this->System->User->Language; 87 } else { 88 $_SESSION['language'] = ''; 89 } 92 90 } 93 } 94 if(!array_key_exists($_SESSION['language'], $LanguageList)) $_SESSION['language'] = ''; 91 if(array_key_exists('language', $_GET)) 92 { 93 if($_GET['language'] == '') { 94 $_SESSION['language'] = ''; 95 } else { 96 $_SESSION['language'] = $_GET['language'] * 1; 97 } 98 } 99 if(!array_key_exists($_SESSION['language'], $LanguageList)) $_SESSION['language'] = ''; 95 100 96 // Show client version selection97 $Output = 'Verze klienta: ';98 $DbResult = $this->Database->query('SELECT `Version`, `Title` FROM `ClientVersion` WHERE `Imported`=1 ORDER BY `Version`');99 while($DbRow = $DbResult->fetch_assoc())100 $Output .= '<a href="?Version='.$DbRow['Version'].'" title="'.$DbRow['Title'].'">'.$DbRow['Version'].'</a> ';101 $Output .= '<br/>';101 // Show client version selection 102 $Output = 'Verze klienta: '; 103 $DbResult = $this->Database->query('SELECT `Version`, `Title` FROM `ClientVersion` WHERE `Imported`=1 ORDER BY `Version`'); 104 while($DbRow = $DbResult->fetch_assoc()) 105 $Output .= '<a href="?Version='.$DbRow['Version'].'" title="'.$DbRow['Title'].'">'.$DbRow['Version'].'</a> '; 106 $Output .= '<br/>'; 102 107 103 // Show language selection104 $Output .= 'Jazyk: ';105 $Lang = '<a href="?language=">Všechny</a>';106 if($_SESSION['language'] == '') $Output .= '<strong>'.$Lang.'</strong> ';107 else $Output .= $Lang;108 foreach($LanguageList as $Language)109 if($Language['Enabled'] == 1)110 {111 $Lang = ' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>';112 if($Language['Id'] == $_SESSION['language']) $Output .= '<strong>'.$Lang.'</strong> ';113 else $Output .= $Lang;114 }108 // Show language selection 109 $Output .= 'Jazyk: '; 110 $Lang = '<a href="?language=">Všechny</a>'; 111 if($_SESSION['language'] == '') $Output .= '<strong>'.$Lang.'</strong> '; 112 else $Output .= $Lang; 113 foreach($LanguageList as $Language) 114 if($Language['Enabled'] == 1) 115 { 116 $Lang = ' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>'; 117 if($Language['Id'] == $_SESSION['language']) $Output .= '<strong>'.$Lang.'</strong> '; 118 else $Output .= $Lang; 119 } 115 120 116 if(is_numeric($_SESSION['language'])) $LanguageName = $LanguageList[$_SESSION['language']]['Name'];117 else $LanguageName = 'Všechny';118 $Output .= '<br/><br /><h3>Statistika dokončení překladů jazyka '.$LanguageName.' pro verzi '.$_SESSION['StatVersion'].'</h3><br/>';119 $Output .= $this->ShowStatTable();121 if(is_numeric($_SESSION['language'])) $LanguageName = $LanguageList[$_SESSION['language']]['Name']; 122 else $LanguageName = 'Všechny'; 123 $Output .= '<br/><br /><h3>Statistika dokončení překladů jazyka '.$LanguageName.' pro verzi '.$_SESSION['StatVersion'].'</h3><br/>'; 124 $Output .= $this->ShowStatTable(); 120 125 121 126 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.