Changeset 531
- Timestamp:
- Feb 24, 2013, 10:38:17 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dictionary.php
r525 r531 48 48 $LanguageList = GetLanguageList(); 49 49 50 if(!isset($_SESSION['language'])) 51 { 52 if($User->Licence(LICENCE_USER)) 53 { 54 $_SESSION['language'] = $User->Language; 55 } else { 56 $LanguageId = reset($LanguageList); 57 $_SESSION['language'] = $LanguageId['Id']; 58 } 59 } 60 61 if(array_key_exists('language', $_GET) or ($_SESSION['language'] == 'all')) 62 $_SESSION['language'] = LoadLanguageIdParameter(); 50 if(!isset($_SESSION['language'])) 51 { 52 if($User->Licence(LICENCE_USER)) 53 { 54 $_SESSION['language'] = $User->Language; 55 } else $_SESSION['language'] = ''; 56 } 57 if(array_key_exists('language', $_GET)) { 58 if($_GET['language'] == '') $_SESSION['language'] = ''; 59 else $_SESSION['language'] = $_GET['language'] * 1; 60 } 63 61 64 62 $Output = '<h3>Slovníček</h3>'; 65 63 66 if(array_key_exists('group', $_GET)) 67 { 64 function DictionaryInsert() 65 { 66 global $System, $User; 67 68 $Output = ''; 69 if($User->Licence(LICENCE_USER)) 70 { 71 $Output .= '<form action="dictionary.php?action=save" method="post">'. 72 '<fieldset><legend>Vložení nového slova</legend>'. 73 '<table><tr><td>'. 74 'Původní anglické slovo:</td><td><input type="text" name="Original" /></td></tr>'. 75 '<tr><td>Přeložené:</td><td><input type="text" name="Translated" /></td></tr>'. 76 '<tr><td>Jazyk:</td><td>'.WriteLanguages($_SESSION['language']).'</td></tr>'. 77 '<tr><td>Volitelný popis:</td><td><input type="text" name="Description" /></td></tr>'. 78 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 79 '</td></tr></table>'. 80 '</fieldset>'. 81 '</form>'; 82 } else $Output .= ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); 83 return($Output); 84 } 85 86 function DictionarySave() 87 { 88 global $System, $User, $Config; 89 90 if($User->Licence(LICENCE_USER)) 91 { 92 if(array_key_exists('Original', $_POST) and array_key_exists('Translated', $_POST) and array_key_exists('Description', $_POST)) 93 { 94 // Check if original text exists and determine entry id 95 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE '. 96 '`Text` = "'.$_POST['Original'].'" AND `Language`= '.$Config['OriginalLanguage']); 97 if($DbResult->num_rows > 0) 98 { 99 $DbRow = $DbResult->fetch_assoc(); 100 $Entry = $DbRow['Entry']; 101 } else 102 { 103 $DbResult = $System->Database->query('SELECT MAX(`Entry`) FROM `Dictionary`'); 104 $DbRow = $DbResult->fetch_row(); 105 $Entry = $DbRow[0] + 1; 106 $System->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , '. 107 '`User`, `Language` ) VALUES ("'.$_POST['Original'].'", "'.$Entry.'", "", NULL, '.$Config['OriginalLanguage'].');'); 108 } 109 110 $DbResult = $System->Database->query('SELECT `Id` FROM `Dictionary` WHERE '. 111 '`Entry` = '.$Entry.' AND `Language`='.$_POST['Language'].' AND `User`='.$User->Id); 112 if($DbResult->num_rows > 0) 113 { 114 $DbRow = $DbResult->fetch_assoc(); 115 $System->Database->query('UPDATE `Dictionary` SET `Text`="'.$_POST['Translated'].'", '. 116 '`Description` = "'.$_POST['Description'].'" WHERE Id='.$DbRow['Id']); 117 } else 118 $System->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , '. 119 '`User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$User->Id.', '.$_POST['Language'].')'); 120 $Output = ShowMessage('Záznam byl uložen!'); 121 } else $Output = ShowMessage('Nebyly zaslány všechny položky formuláře.', MESSAGE_CRITICAL); 122 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); 123 return($Output); 124 } 125 126 function DictionaryRemove() 127 { 128 global $System, $User; 129 130 if($User->Licence(LICENCE_USER)) 131 { 132 $System->Database->query('DELETE FROM `Dictionary` WHERE (`User`='.$User->Id.') AND (`Id`='.$_GET['id'].')'); 133 $Output = ShowMessage('Záznam odstraněn.'); 134 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); 135 return($Output); 136 } 137 138 function DictionaryModify() 139 { 140 global $System, $User, $Config; 141 142 if($User->Licence(LICENCE_USER)) 143 { 144 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE `Id`='.$_GET['id']); 145 $DbRow = $DbResult->fetch_assoc(); 146 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE (`User` IS NULL) '. 147 'AND (`Entry`='.$DbRow['Entry'].') AND (`Language`= '.$Config['OriginalLanguage'].')'); 148 $DbRow2 = $DbResult->fetch_assoc(); 149 $Output = '<form action="dictionary.php?action=save" method="post">'. 150 '<fieldset><legend>Upravení slova</legend>'. 151 '<input type="hidden" name="id" value="'.$_GET['id'].'"/>'. 152 '<table><tr><td>'. 153 'Původní anglické slovo:</td><td><input type="text" name="Original" value="'.$DbRow2['Text'].'" /></td></tr>'. 154 '<tr><td>Přeložené:</td><td><input type="text" name="Translated" value="'.$DbRow['Text'].'" /></td></tr>'. 155 '<tr><td>Jazyk:</td><td>'.WriteLanguages($DbRow['Language']).'</td></tr>'. 156 '<tr><td>Popis:</td><td><input type="text" name="Description" value="'.$DbRow['Description'].'" /></td></tr>'. 157 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 158 '</td></tr></table>'. 159 '</fieldset>'. 160 '</form>'; 161 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); 162 return($Output); 163 } 164 165 function DictionaryGroup() 166 { 167 global $System, $User; 168 169 $Output = ''; 68 170 $GroupId = LoadGroupIdParameter(); 69 if(array_key_exists('mode', $_GET)) $mode = $_GET['mode']; 70 171 if(array_key_exists('mode', $_GET)) $mode = $_GET['mode']; 172 else $mode = 0; //0 = přesné názvy, 1=všechny názvy, 2=nepřeložené 71 173 $Table = $TranslationTree[$GroupId]['TablePrefix']; 72 73 if(array_key_exists('ID', $_GET)) 74 { 75 $TextID = $_GET['ID']; 76 $Output .= 'Přeložené názvy vztahující se k překladu: <a target="_NEW" href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a><br />'. 77 '<a href="?mode=1&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit všechny podobné výsledky">Všechny</a> '.78 '<a href="?mode=0&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit pouze přesné výsledky">Přesné</a> '.79 '<a href="?mode=2&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit všechny nepřeložené">Nepřeložené</a> ';80 $DbResult = $System->Database->query('SELECT * FROM '.$Table.' W hereID = '.$TextID);174 175 if(array_key_exists('ID', $_GET)) 176 { 177 $TextID = $_GET['ID']; 178 $Output .= 'Přeložené názvy vztahující se k překladu: <a target="_NEW" href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a><br />'. 179 '<a href="?mode=1&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit všechny podobné výsledky">Všechny</a> '. 180 '<a href="?mode=0&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit pouze přesné výsledky">Přesné</a> '. 181 '<a href="?mode=2&group='.$GroupId.'&ID='.$TextID.'" title="Zobrazit všechny nepřeložené">Nepřeložené</a> '; 182 $DbResult = $System->Database->query('SELECT * FROM '.$Table.' WHERE ID = '.$TextID); 81 183 $Line = $DbResult->fetch_assoc(); 82 184 if(!$Line) $Output .= ShowMessage('Překlad nenalezen.', MESSAGE_CRITICAL); 83 185 else 84 { 186 { 85 187 $Text = ''; 86 188 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) 87 189 $Text .= ' '.$Line[$TextItem['Column']]; 88 190 $Output .= WriteTranslatNames($Text, $mode); 89 191 } 90 } 91 } else 92 { 93 if(array_key_exists('action', $_GET)) 94 { 95 if(($_GET['action'] == 'insert') and $User->Licence(LICENCE_USER)) 96 { 97 $Output .= '<form action="dictionary.php?action=save" method="post">'. 98 '<fieldset><legend>Vložení nového slova</legend>'. 99 '<table><tr><td>'. 100 'Původní anglické slovo:</td><td><input type="text" name="Original" /></td></tr>'. 101 '<tr><td>Přeložené:</td><td><input type="text" name="Translated" /></td></tr>'. 102 '<tr><td>Volitelný popis:</td><td><input type="text" name="Description" /></td></tr>'. 103 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 104 '</td></tr></table>'. 105 '</fieldset>'. 106 '</form>'; 107 } else 108 if(($_GET['action'] == 'save') and $User->Licence(LICENCE_USER)) 109 { 110 if(array_key_exists('Original', $_POST) and array_key_exists('Translated', $_POST) and array_key_exists('Description', $_POST)) 111 { 112 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE `Text` = "'.$_POST['Original'].'" AND `Language`= '.$Config['OriginalLanguage']); 113 if($DbResult->num_rows > 0) 114 { 115 $DbRow = $DbResult->fetch_assoc(); 116 $Entry = $DbRow['Entry']; 117 } else 118 { 119 $DbResult = $System->Database->query('SELECT MAX(`Entry`) FROM `Dictionary`'); 120 $DbRow = $DbResult->fetch_row(); 121 $Entry = $DbRow[0] + 1; 122 $System->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Original'].'", "'.$Entry.'", "", NULL, '.$Config['OriginalLanguage'].');'); 123 } 124 125 $DbResult = $System->Database->query('SELECT `Id` FROM `Dictionary` WHERE `Entry` = '.$Entry.' AND `Language`='.$_SESSION['language'].' AND `User`='.$User->Id); 126 if($DbResult->num_rows > 0) 127 { 128 $DbRow = $DbResult->fetch_assoc(); 129 $System->Database->query('UPDATE `Dictionary` SET `Text`="'.$_POST['Translated'].'", `Description` = "'.$_POST['Description'].'" WHERE Id='.$DbRow['Id']); 130 } else 131 $System->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$User->Id.', '.$_SESSION['language'].')'); 132 $Output .= ShowMessage('Záznam byl uložen!'); 133 } else $Output .= ShowMessage('Nebyly zaslány všechny položky formuláře.', MESSAGE_CRITICAL); 134 } else 135 if(($_GET['action'] == 'remove') and $User->Licence(LICENCE_USER)) 136 { 137 $System->Database->query('DELETE FROM `Dictionary` WHERE `User`='.$User->Id.' AND `Language`='.$_SESSION['language'].' AND `Entry`='.$_GET['entry']); 138 $Output .= ShowMessage('Záznam odstraněn.'); 139 } else 140 if(($_GET['action'] == 'modify') and $User->Licence(LICENCE_USER)) 141 { 142 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE `User`='.$User->Id.' AND `Entry`='.$_GET['entry'].' AND `Language`='.$_SESSION['language']); 143 $DbRow = $DbResult->fetch_assoc(); 144 $DbResult = $System->Database->query('SELECT * FROM `Dictionary` WHERE (`User` IS NULL) AND (`Entry`='.$_GET['entry'].') AND (`Language`= '.$Config['OriginalLanguage'].')'); 145 $DbRow2 = $DbResult->fetch_assoc(); 146 $Output .= '<form action="dictionary.php?action=save" method="post">'. 147 '<fieldset><legend>Upravení slova</legend>'. 148 '<input type="hidden" name="entry" value="'.$_GET['entry'].'"/>'. 149 '<table><tr><td>'. 150 'Původní anglické slovo:</td><td><input type="text" name="Original" value="'.$DbRow2['Text'].'" /></td></tr>'. 151 '<tr><td>Přeložené:</td><td><input type="text" name="Translated" value="'.$DbRow['Text'].'" /></td></tr>'. 152 '<tr><td>Popis:</td><td><input type="text" name="Description" value="'.$DbRow['Description'].'" /></td></tr>'. 153 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 154 '</td></tr></table>'. 155 '</fieldset>'. 156 '</form>'; 157 } 158 } 159 160 $Output .= '<form action="dictionary.php" method="get" style="margin: 0px; padding: 0px;">'. 192 } 193 return($Output); 194 } 195 196 function DictionaryShow() 197 { 198 global $System, $User, $LanguageList, $Config; 199 200 $Output = '<form action="dictionary.php" method="get" style="margin: 0px; padding: 0px;">'. 161 201 '<table style="width: 100%; height: 100%;">'; 162 202 … … 171 211 $Output .= '</td></tr>'. 172 212 '<tr><td>Jazyk: '; 213 $Lang = '<a href="?language=">Všechny</a>'; 214 if($_SESSION['language'] == '') $Output .= '<strong>'.$Lang.'</strong> '; 215 else $Output .= $Lang; 173 216 foreach($LanguageList as $Language) 174 217 if($Language['Enabled'] == 1) … … 182 225 //<div style="overflow: auto; width: 100%; height: 100%;">'); 183 226 184 if($_SESSION['language'] == 'all') $LanguageFilter = ''; 185 else $LanguageFilter = ' AND (`T2`.`Language` = '.$_SESSION['language'].')'; 227 if(!is_numeric($_SESSION['language'])) $LanguageFilter = ''; 228 else $LanguageFilter = ' AND (`T1`.`Language` = '.$_SESSION['language'].')'; 229 186 230 if($Search <> '') 187 231 { 188 $sql = 'SELECT `User`.`Name` AS `UserName`, `User`. `ID` AS `UserID`, '. 189 '`T3`.`Entry`, `T3`.`Original`, `T3`.`Translated`, `T3`.`Description` '. 190 'FROM (SELECT `T2`.`User`, `T1`.`Language`, `T1`.`Text` AS `Original`, '. 191 '`T2`.`Text` AS `Translated`, `T2`.`Description`, `T1`.`Entry` AS `Entry` '. 232 $Condition = ' AND (LOWER(`T1`.`Text`) LIKE LOWER("%'.$Search.'%")) OR '. 233 '(LOWER(`T1`.`Description`) LIKE LOWER("%'.$Search.'%"))'; 234 } else $Condition = ''; 235 $sql = 'SELECT `User`.`Name` AS `UserName`, `User`.`Id` AS `UserId`, '. 236 '`Language`.`Name` AS `LangName`, `T1`.`Id` AS `Id`, '. 237 '`T1`.`Entry`, `T2`.`Text` AS `Original`, `T1`.`Text` AS `Translated`, `T1`.`Description` '. 192 238 'FROM `Dictionary` AS `T1` JOIN `Dictionary` AS `T2` '. 193 'ON (`T2`.`Entry` = `T1`.`Entry`) '.$LanguageFilter. 194 ' WHERE LOWER(`T1`.`Text`) LIKE LOWER("%'.$Search.'%") OR '. 195 'LOWER(`T1`.`Description`) LIKE LOWER("%'.$Search.'%") ) AS `T3` '. 196 'JOIN `User` ON `User`.`ID` = `T3`.`User` WHERE `T3`.`Language` = '.$Config['OriginalLanguage']; 197 } else $sql = 'SELECT `User`.`Name` AS `UserName`, `ID` AS `UserID`, '. 198 '`T3`.`Entry`, `T3`.`Original`, `T3`.`Translated`, `T3`.`Description` FROM '. 199 '(SELECT `T2`.`User`, `T1`.Language, `T1`.`Text` AS `Original`, '. 200 '`T2`.`Text` AS `Translated`, `T2`.`Description`, `T1`.`Entry` AS `Entry` '. 201 'FROM `Dictionary` AS `T1` JOIN `Dictionary` AS `T2` ON '. 202 '(`T2`.`Entry` = `T1`.`Entry`) '.$LanguageFilter.') AS `T3` '. 203 'JOIN `User` ON `User`.`ID` = `T3`.`User` WHERE `T3`.`Language` = '.$Config['OriginalLanguage']; 204 239 'ON (`T2`.`Entry` = `T1`.`Entry`) AND (`T2`.`Language` = '.$Config['OriginalLanguage'].') '. 240 'JOIN `Language` ON `Language`.`Id` = `T1`.`Language` '. 241 'JOIN `User` ON `User`.`ID` = `T1`.`User` '. 242 'WHERE 1'. 243 $LanguageFilter.$Condition; 244 205 245 $DbResult = $System->Database->query('SELECT COUNT(*) FROM ('.$sql.') AS `T1`'); 206 246 $DbRow = $DbResult->fetch_row(); … … 209 249 $Output .= $PageList['Output']; 210 250 211 $TableColumns = array( 251 if(is_numeric($_SESSION['language'])) $LanguageName = $LanguageList[$_SESSION['language']]['Name']; 252 else $LanguageName = 'Překlad'; 253 $TableColumns = array( 212 254 array('Name' => 'Original', 'Title' => 'Angličtina'), 213 array('Name' => 'Translated', 'Title' => $LanguageList[$_SESSION['language']]['Name']), 214 array('Name' => 'Description', 'Title' => 'Popis'), 215 array('Name' => 'UserName', 'Title' => 'Překladatel'), 216 ); 255 array('Name' => 'Translated', 'Title' => $LanguageName), 256 ); 257 if(!is_numeric($_SESSION['language'])) $TableColumns[] = array('Name' => 'Language', 'Title' => 'Jazyk'); 258 $TableColumns[] = array('Name' => 'Description', 'Title' => 'Popis'); 259 $TableColumns[] = array('Name' => 'UserName', 'Title' => 'Překladatel'); 217 260 if($User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 218 261 $Order = GetOrderTableHeader($TableColumns, 'Original'); … … 223 266 while($Line = $DbResult->fetch_assoc()) 224 267 { 225 $Output .= '<tr> 226 <td>'.$Line['Original'].'</td> 227 <td><strong>'.$Line['Translated'].'</strong></td> 228 <td>'.$Line['Description'].'</td> 229 <td>'.$Line['UserName'].'</td>'; 268 $Output .= '<tr>'. 269 '<td>'.$Line['Original'].'</td>'. 270 '<td><strong>'.$Line['Translated'].'</strong></td>'; 271 if(!is_numeric($_SESSION['language'])) $Output .= '<td>'.$Line['LangName'].'</td>'; 272 $Output .= '<td>'.$Line['Description'].'</td>'. 273 '<td><a href="user.php?user='.$Line['UserId'].'">'.$Line['UserName'].'</a></td>'; 230 274 if($User->Licence(LICENCE_USER)) 231 275 { 232 if($Line['UserI D'] == $User->Id)233 $Output .= '<td><a href="?action=remove& entry='.$Line['Entry'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'.234 ' <a href="?action=modify& entry='.$Line['Entry'].'">Upravit</a></td>';276 if($Line['UserId'] == $User->Id) 277 $Output .= '<td><a href="?action=remove&id='.$Line['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'. 278 ' <a href="?action=modify&id='.$Line['Id'].'">Upravit</a></td>'; 235 279 else $Output .= '<td></td>'; 236 280 } … … 241 285 '</td></tr>'. 242 286 '</table></form>'; 243 } 287 return($Output); 288 } 289 290 $Output = ''; 291 if(array_key_exists('action', $_GET)) 292 { 293 if($_GET['action'] == 'group') $Output .= DictionaryGroup(); 294 else if($_GET['action'] == 'insert') $Output .= DictionaryInsert(); 295 else if($_GET['action'] == 'save') $Output .= DictionarySave(); 296 else if($_GET['action'] == 'remove') $Output .= DictionaryRemove(); 297 else if($_GET['action'] == 'modify') $Output .= DictionaryModify(); 298 else $Output .= ShowMessage('Neznámá akce', MESSAGE_CRITICAL); 299 } 300 $Output .= DictionaryShow(); 244 301 245 302 ShowPage($Output); -
trunk/form.php
r525 r531 116 116 { 117 117 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) 118 $Output .= '<a href="dictionary.php? group='.$GroupId.'&ID='.$LineAJ['ID'].'" target="_blank" title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>';118 $Output .= '<a href="dictionary.php?action=group&group='.$GroupId.'&ID='.$LineAJ['ID'].'" target="_blank" title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>'; 119 119 $Output .= ' <input type="submit" value="Uložit do rozepsaných" name="save" title="Klikněte na uložit pro pozdější dokončení překladu" /> 120 120 <input type="submit" value="Dokončeno" name="End" title="Klikněte na Dokončeno jesli jsou všechny texty hotové a chcete již publikovat" /> '; -
trunk/includes/Version.php
r530 r531 1 1 <?php 2 2 3 $Revision = 53 0; // Subversion revision3 $Revision = 531; // Subversion revision 4 4 $DatabaseRevision = 524; 5 $ReleaseTime = '2013-02-2 3';5 $ReleaseTime = '2013-02-24'; 6 6 7 7 ?> -
trunk/includes/global.php
r530 r531 447 447 } 448 448 449 function LoadLanguageIdParameter()450 {451 global $LanguageList;452 453 if(array_key_exists('language', $_GET)) $LanguageId = $_GET['language'] * 1;454 else $LanguageId = '';455 456 if(isset($LanguageList[$LanguageId]) == false)457 {458 $LanguageId = reset($LanguageList);459 $LanguageId = $LanguageId['Id'];460 }461 return($LanguageId);462 }463 464 449 function LoadCommandLineParameters() 465 450 { -
trunk/statistic.php
r525 r531 7 7 if(array_key_exists('Version', $_GET)) $_SESSION['StatVersion'] = $_GET['Version']; 8 8 if(!array_key_exists('StatVersion', $_SESSION)) $_SESSION['StatVersion'] = $Config['Web']['GameVersion']; 9 9 10 if(!isset($_SESSION['language'])) 10 11 { 11 12 if($User->Licence(LICENCE_USER)) 12 13 { 13 $_SESSION['language'] = $User->Language;14 14 $_SESSION['language'] = $User->Language; 15 } else $_SESSION['language'] = ''; 15 16 } 16 17 if(array_key_exists('language', $_GET)) { 17 if($_GET['language'] == ' all') $_SESSION['language'] = 'all';18 else $_SESSION['language'] = LoadLanguageIdParameter();18 if($_GET['language'] == '') $_SESSION['language'] = ''; 19 else $_SESSION['language'] = $_GET['language'] * 1; 19 20 } 20 21 … … 89 90 // Show language selection 90 91 $Output .= 'Jazyk: '; 91 $Lang = '<a href=" statistic.php?language=all">Všechny</a>';92 if( 'all' == $_SESSION['language']) $Output .= '<strong>'.$Lang.'</strong> ';92 $Lang = '<a href="?language=">Všechny</a>'; 93 if($_SESSION['language'] == '') $Output .= '<strong>'.$Lang.'</strong> '; 93 94 else $Output .= $Lang; 94 95 foreach($LanguageList as $Language)
Note:
See TracChangeset
for help on using the changeset viewer.