Changeset 577
- Timestamp:
- Sep 11, 2013, 10:37:54 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Dictionary/Dictionary.php
r569 r577 76 76 function DictionaryInsert() 77 77 { 78 global $User;79 80 78 $Output = ''; 81 if($ User->Licence(LICENCE_USER))79 if($this->System->User->Licence(LICENCE_USER)) 82 80 { 83 81 $Output .= '<form action="?action=save" method="post">'. … … 98 96 function DictionarySave() 99 97 { 100 global $User, $Config; 101 102 if($User->Licence(LICENCE_USER)) 98 if($this->System->User->Licence(LICENCE_USER)) 103 99 { 104 100 if(array_key_exists('Original', $_POST) and array_key_exists('Translated', $_POST) and array_key_exists('Description', $_POST)) … … 106 102 // Check if original text exists and determine entry id 107 103 $DbResult = $this->Database->query('SELECT * FROM `Dictionary` WHERE '. 108 '`Text` = "'.$_POST['Original'].'" AND `Language`= '.$ Config['OriginalLanguage']);104 '`Text` = "'.$_POST['Original'].'" AND `Language`= '.$this->System->Config['OriginalLanguage']); 109 105 if($DbResult->num_rows > 0) 110 106 { … … 117 113 $Entry = $DbRow[0] + 1; 118 114 $this->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , '. 119 '`User`, `Language` ) VALUES ("'.$_POST['Original'].'", "'.$Entry.'", "", NULL, '.$ Config['OriginalLanguage'].');');115 '`User`, `Language` ) VALUES ("'.$_POST['Original'].'", "'.$Entry.'", "", NULL, '.$this->System->Config['OriginalLanguage'].');'); 120 116 } 121 117 122 118 $DbResult = $this->Database->query('SELECT `Id` FROM `Dictionary` WHERE '. 123 '`Entry` = '.$Entry.' AND `Language`='.$_POST['Language'].' AND `User`='.$ User->Id);119 '`Entry` = '.$Entry.' AND `Language`='.$_POST['Language'].' AND `User`='.$this->System->User->Id); 124 120 if($DbResult->num_rows > 0) 125 121 { … … 129 125 } else 130 126 $this->Database->query('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , '. 131 '`User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$User->Id.', '.$_POST['Language'].')'); 127 '`User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'. 128 $_POST['Description'].'", '.$this->System->User->Id.', '.$_POST['Language'].')'); 132 129 $Output = ShowMessage('Záznam byl uložen!'); 133 130 } else $Output = ShowMessage('Nebyly zaslány všechny položky formuláře.', MESSAGE_CRITICAL); … … 138 135 function DictionaryRemove() 139 136 { 140 global $User; 141 142 if($User->Licence(LICENCE_USER)) 143 { 144 $this->Database->query('DELETE FROM `Dictionary` WHERE (`User`='.$User->Id.') AND (`Id`='.($_GET['id'] * 1).')'); 137 if($this->System->User->Licence(LICENCE_USER)) 138 { 139 $this->Database->query('DELETE FROM `Dictionary` WHERE (`User`='.$this->System->User->Id.') AND (`Id`='.($_GET['id'] * 1).')'); 145 140 $Output = ShowMessage('Záznam odstraněn.'); 146 141 } else $Output = ShowMessage('Nemáte oprávnění', MESSAGE_CRITICAL); … … 150 145 function DictionaryModify() 151 146 { 152 global $User, $Config; 153 154 if($User->Licence(LICENCE_USER)) 147 if($this->System->User->Licence(LICENCE_USER)) 155 148 { 156 149 $DbResult = $this->Database->query('SELECT * FROM `Dictionary` WHERE `Id`='.($_GET['id'] * 1)); … … 159 152 $DbRow = $DbResult->fetch_assoc(); 160 153 $DbResult = $this->Database->query('SELECT * FROM `Dictionary` WHERE (`User` IS NULL) '. 161 'AND (`Entry`='.$DbRow['Entry'].') AND (`Language`= '.$ Config['OriginalLanguage'].')');154 'AND (`Entry`='.$DbRow['Entry'].') AND (`Language`= '.$this->System->Config['OriginalLanguage'].')'); 162 155 $DbRow2 = $DbResult->fetch_assoc(); 163 156 $Output = '<form action="?action=save" method="post">'. … … 180 173 function DictionaryGroup() 181 174 { 182 global $ User, $TranslationTree;175 global $TranslationTree; 183 176 184 177 $Output = ''; … … 211 204 function DictionaryShow() 212 205 { 213 global $ User, $LanguageList, $Config;206 global $LanguageList; 214 207 215 208 $Output = '<form action="?" method="get" style="margin: 0px; padding: 0px;">'. … … 222 215 <input type="text" value="'.$Search.'" name="search" size="30" /> 223 216 <input type="submit" value="Vyhledat" />'; 224 if($User->Licence(LICENCE_USER)) $Output .= ' <a href="?action=insert">Vložit slovo</a>'; 217 if($this->System->User->Licence(LICENCE_USER)) 218 $Output .= ' <a href="?action=insert">Vložit slovo</a>'; 225 219 226 220 $Output .= '</td></tr>'. … … 252 246 '`T1`.`Entry`, `T2`.`Text` AS `Original`, `T1`.`Text` AS `Translated`, `T1`.`Description` '. 253 247 'FROM `Dictionary` AS `T1` JOIN `Dictionary` AS `T2` '. 254 'ON (`T2`.`Entry` = `T1`.`Entry`) AND (`T2`.`Language` = '.$ Config['OriginalLanguage'].') '.248 'ON (`T2`.`Entry` = `T1`.`Entry`) AND (`T2`.`Language` = '.$this->System->Config['OriginalLanguage'].') '. 255 249 'JOIN `Language` ON `Language`.`Id` = `T1`.`Language` '. 256 250 'JOIN `User` ON `User`.`ID` = `T1`.`User` '. … … 273 267 $TableColumns[] = array('Name' => 'Description', 'Title' => 'Popis'); 274 268 $TableColumns[] = array('Name' => 'UserName', 'Title' => 'Překladatel'); 275 if($ User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce');269 if($this->System->User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 276 270 $Order = GetOrderTableHeader($TableColumns, 'Original'); 277 271 $Output .= '<table class="BaseTable">'.$Order['Output']; … … 287 281 $Output .= '<td>'.$Line['Description'].'</td>'. 288 282 '<td><a href="user.php?user='.$Line['UserId'].'">'.$Line['UserName'].'</a></td>'; 289 if($ User->Licence(LICENCE_USER))290 { 291 if($Line['UserId'] == $ User->Id)283 if($this->System->User->Licence(LICENCE_USER)) 284 { 285 if($Line['UserId'] == $this->System->User->Id) 292 286 $Output .= '<td><a href="?action=remove&id='.$Line['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'. 293 287 ' <a href="?action=modify&id='.$Line['Id'].'">Upravit</a></td>'; … … 305 299 function Show() 306 300 { 307 global $LanguageList , $User;301 global $LanguageList; 308 302 309 303 $LanguageList = GetLanguageList(); … … 311 305 if(!isset($_SESSION['language'])) 312 306 { 313 if($ User->Licence(LICENCE_USER))307 if($this->System->User->Licence(LICENCE_USER)) 314 308 { 315 $_SESSION['language'] = $ User->Language;309 $_SESSION['language'] = $this->System->User->Language; 316 310 } else $_SESSION['language'] = ''; 317 311 } -
trunk/Modules/Export/Page.php
r572 r577 16 16 function ExportList() 17 17 { 18 global $User;19 20 18 $Output = '<a href="?Action=ViewList">Všechny</a>'; 21 if($ User->Licence(LICENCE_USER))19 if($this->System->User->Licence(LICENCE_USER)) 22 20 { 23 21 $Output .= ' <a href="?Action=ViewList&Filter=Others">Ostatních</a>'. … … 25 23 } 26 24 27 if($ User->Licence(LICENCE_USER))25 if($this->System->User->Licence(LICENCE_USER)) 28 26 $Output .= '<br/><div style="text-align: center;"><a href="?Action=Create">Vytvořit nový export</a></div><br/>'; 29 27 … … 31 29 if(array_key_exists('Filter', $_GET)) 32 30 { 33 if($_GET['Filter'] == 'My') $Filter = ' WHERE `Export`.`User` = '.$ User->Id;34 if($_GET['Filter'] == 'Others') $Filter = ' WHERE `Export`.`User` != '.$ User->Id;31 if($_GET['Filter'] == 'My') $Filter = ' WHERE `Export`.`User` = '.$this->System->User->Id; 32 if($_GET['Filter'] == 'Others') $Filter = ' WHERE `Export`.`User` != '.$this->System->User->Id; 35 33 } 36 34 … … 62 60 $Action = '<a href="?Action=View&ExportId='.$Export['Id'].'&Tab=0">Zobrazit</a> '. 63 61 '<a href="?Action=View&ExportId='.$Export['Id'].'&Tab=7">Exportovat</a>'; 64 if($Export['User'] == $ User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>';65 if($ User->Id != null) $Action .= ' <a href="?Action=Clone&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu klonovat položku?\');">Klonovat</a>';62 if($Export['User'] == $this->System->User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'; 63 if($this->System->User->Id != null) $Action .= ' <a href="?Action=Clone&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu klonovat položku?\');">Klonovat</a>'; 66 64 $Output .= '<tr><td>'.HumanDate($Export['TimeCreate']).'</td>'. 67 65 '<td><a href="'.$this->System->Link('/user.php?user='.$Export['User']).'">'.$Export['UserName'].'</a></td>'. … … 80 78 function ExportCreate() 81 79 { 82 global $User; 83 84 if($User->Licence(LICENCE_USER)) 85 { 86 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `User`='.$User->Id); 80 if($this->System->User->Licence(LICENCE_USER)) 81 { 82 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `User`='.$this->System->User->Id); 87 83 $DbRow = $DbResult->fetch_row(); 88 84 if($DbRow[0] < $this->System->Config['MaxExportPerUser']) … … 101 97 function ExportCreateFinish() 102 98 { 103 global $User; 104 105 if($User->Licence(LICENCE_USER)) 99 if($this->System->User->Licence(LICENCE_USER)) 106 100 { 107 101 if(array_key_exists('Title', $_POST) and array_key_exists('Description', $_POST)) 108 102 { 109 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `User`='.$ User->Id);103 $DbResult = $this->System->Database->query('SELECT COUNT(*) FROM `Export` WHERE `User`='.$this->System->User->Id); 110 104 $DbRow = $DbResult->fetch_row(); 111 105 if($DbRow[0] < $this->System->Config['MaxExportPerUser']) 112 106 { 113 $this->System->Database->query('INSERT INTO `Export` (`Title`, `User`, `TimeCreate`, `WithDiacritic`, `Description`) VALUES ("'.$_POST['Title'].'", '.$ User->Id.', NOW(), 1, "'.$_POST['Description'].'")');107 $this->System->Database->query('INSERT INTO `Export` (`Title`, `User`, `TimeCreate`, `WithDiacritic`, `Description`) VALUES ("'.$_POST['Title'].'", '.$this->System->User->Id.', NOW(), 1, "'.$_POST['Description'].'")'); 114 108 $ExportId = $this->System->Database->insert_id; 115 109 $Output = ShowMessage('Nový export vytvořen.<br/>Přímý odkaz na tento export: <a href="?Action=View&ExportId='.$ExportId.'">zde</a>'); … … 125 119 function ExportDelete() 126 120 { 127 global $User; 128 129 if($User->Licence(LICENCE_USER)) 130 { 131 $DbResult = $this->System->Database->query('SELECT * FROM `Export` WHERE (`Id`='.($_GET['ExportId'] * 1).') AND (`User`='.$User->Id.')'); 121 if($this->System->User->Licence(LICENCE_USER)) 122 { 123 $DbResult = $this->System->Database->query('SELECT * FROM `Export` WHERE (`Id`='.($_GET['ExportId'] * 1).') AND (`User`='.$this->System->User->Id.')'); 132 124 if($DbResult->num_rows > 0) 133 125 { … … 149 141 function ExportViewTranslators() 150 142 { 151 global $TranslationTree , $User;143 global $TranslationTree; 152 144 153 145 $Output = ''; … … 155 147 $DbResult = $this->System->Database->query('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId']); 156 148 $Export = $DbResult->fetch_assoc(); 157 if($ User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true;149 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->Id == $Export['User'])) $Editable = true; 158 150 else $Editable = false; 159 151 … … 251 243 function ExportViewGeneral() 252 244 { 253 global $User;254 255 245 $DisabledInput = array(false => ' disabled="disabled"', true => ''); 256 246 $DisabledTextArea = array(false => ' readonly="yes"', true => ''); … … 258 248 $DbRows = $this->System->Database->query('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId']); 259 249 $Export = $DbRows->fetch_assoc(); 260 if($ User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true;250 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->Id == $Export['User'])) $Editable = true; 261 251 else $Editable = false; 262 252 … … 291 281 function ExportViewLanguages() 292 282 { 293 global $TranslationTree , $User;283 global $TranslationTree; 294 284 295 285 $Output = ''; … … 297 287 $DbRows = $this->System->Database->query('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId']); 298 288 $Export = $DbRows->fetch_assoc(); 299 if($ User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true;289 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->Id == $Export['User'])) $Editable = true; 300 290 else $Editable = false; 301 291 … … 382 372 function ExportViewGroups() 383 373 { 384 global $TranslationTree , $User;374 global $TranslationTree; 385 375 386 376 $Output = ''; … … 388 378 $DbRows = $this->System->Database->query('SELECT * FROM Export WHERE Id='.$_GET['ExportId']); 389 379 $Export = $DbRows->fetch_assoc(); 390 if($ User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true;380 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->Id == $Export['User'])) $Editable = true; 391 381 else $Editable = false; 392 382 … … 469 459 function ExportViewOutputFormat() 470 460 { 471 global $User;472 473 461 $Output = ''; 474 462 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 479 467 { 480 468 $Export = $DbRows->fetch_assoc(); 481 if($ User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true;469 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->Id == $Export['User'])) $Editable = true; 482 470 else $Editable = false; 483 471 … … 516 504 function ExportViewVersion() 517 505 { 518 global $User;519 520 506 $Output = ''; 521 507 $DisabledInput = array(false => ' disabled="disabled"', true => ''); 522 508 $DbRows = $this->System->Database->query('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId']); 523 509 $Export = $DbRows->fetch_assoc(); 524 if($ User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true;510 if($this->System->User->Licence(LICENCE_USER) and ($this->System->User->Id == $Export['User'])) $Editable = true; 525 511 else $Editable = false; 526 512 -
trunk/Modules/FrontPage/FrontPage.php
r565 r577 28 28 function HandleLoginForm() 29 29 { 30 global $ User, $Message, $MessageType;30 global $Message, $MessageType; 31 31 32 32 if(array_key_exists('action', $_GET)) … … 36 36 if(array_key_exists('LoginUser', $_POST) and array_key_exists('LoginPass', $_POST)) 37 37 { 38 $ User->Login($_POST['LoginUser'], $_POST['LoginPass']);39 if($ User->Role == LICENCE_ANONYMOUS)38 $this->System->User->Login($_POST['LoginUser'], $_POST['LoginPass']); 39 if($this->System->User->Role == LICENCE_ANONYMOUS) 40 40 { 41 41 $Message = 'Jméno nebo heslo bylo zadáno špatně.'; … … 43 43 } else 44 44 { 45 $Message = 'Přihlášení proběhlo úspěšně. Vítej <strong>'.$ User->Name.'</strong>!';45 $Message = 'Přihlášení proběhlo úspěšně. Vítej <strong>'.$this->System->User->Name.'</strong>!'; 46 46 $MessageType = MESSAGE_INFORMATION; 47 47 } … … 54 54 if($_GET['action'] == 'logout') 55 55 { 56 if($ User->Role != LICENCE_ANONYMOUS)56 if($this->System->User->Role != LICENCE_ANONYMOUS) 57 57 { 58 58 WriteLog('Odhlášení', LOG_TYPE_USER); 59 $ User->Logout();59 $this->System->User->Logout(); 60 60 $Message = 'Byl jsi odhlášen.'; 61 61 $MessageType = MESSAGE_INFORMATION; -
trunk/Modules/Import/Manage.php
r551 r577 95 95 function Show() 96 96 { 97 global $User;98 99 97 $Output = ''; 100 if($ User->Licence(LICENCE_ADMIN))98 if($this->System->User->Licence(LICENCE_ADMIN)) 101 99 { 102 100 if(array_key_exists('action', $_GET)) -
trunk/Modules/Log/Log.php
r569 r577 26 26 function DoAddItem($Message) 27 27 { 28 WriteLog($Message, LOG_TYPE_ERROR); 28 $this->WriteLog($Message, LOG_TYPE_ERROR); 29 } 30 31 function WriteLog($Text, $Type) 32 { 33 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 34 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 35 36 if(!is_null($this->System->User->Id)) $UserId = $this->System->User->Id; 37 else $UserId = 'NULL'; 38 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP`, `URL` ) '. 39 'VALUES ('.$UserId.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'", "'.$_SERVER['REQUEST_URI'].'")'; 40 $this->System->Database->query($Query); 29 41 } 30 42 } -
trunk/Modules/Referrer/Referrer.php
r569 r577 57 57 function ShowList() 58 58 { 59 global $System, $User; 60 61 $Banner = '<a href="http://'.$System->Config['Web']['Host'].$System->Link('/').'"><img src="http://'.$System->Config['Web']['Host'].$System->Link('/banners/wowpreklad_big.jpg').'" '. 59 $Banner = '<a href="http://'.$this->System->Config['Web']['Host'].$this->System->Link('/').'">'. 60 '<img src="http://'.$this->System->Config['Web']['Host'].$this->System->Link('/banners/wowpreklad_big.jpg').'" '. 62 61 'alt="wowpreklad" title="Otevřený projekt překládání celé hry World of Warcraft" '. 63 62 'class="banner" height="60" width="468" /></a>'; 64 63 65 $BannerSmall = '<a href="http://'.$System->Config['Web']['Host'].$System->Link('/').'"><img src="http://'.$System->Config['Web']['Host'].$System->Link('/banners/wowpreklad_small.jpg').'" '. 64 $BannerSmall = '<a href="http://'.$this->System->Config['Web']['Host'].$this->System->Link('/').'">'. 65 '<img src="http://'.$this->System->Config['Web']['Host'].$this->System->Link('/banners/wowpreklad_small.jpg').'" '. 66 66 'alt="wowpreklad" title="Otevřený projekt překládání celé hry World of Warcraft" '. 67 67 'class="banner" height="31" width="88" /></a>'; … … 77 77 <div style="font-size: 10px;">Seznam je automaticky aktualizován a zobrazeny jsou servery, ze kterých přišli uživatelé během posledních třech měsíců řazený sestupně dle nejnovějších.</div><br />'; 78 78 79 if(!$ User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Show`=1) AND (`Parent` IS NULL)';79 if(!$this->System->User->Licence(LICENCE_ADMIN)) $Where = ' WHERE (`Show`=1) AND (`Parent` IS NULL)'; 80 80 else $Where = ''; 81 81 $Query = 'SELECT *, (SELECT Web FROM `Referrer` AS T4 WHERE T4.Id = T3.Parent) AS ParentName '. … … 101 101 array('Name' => 'TotalHits', 'Title' => 'Příchodů'), 102 102 ); 103 if($ User->Licence(LICENCE_ADMIN))103 if($this->System->User->Licence(LICENCE_ADMIN)) 104 104 { 105 105 $TableColumns[] = array('Name' => 'Show', 'Title' => 'Viditelné'); … … 119 119 '<td>'.HumanDate($Line['MaxDateLast']).'</td>'. 120 120 '<td>'.$Line['TotalHits'].'</td>'; 121 if($ User->Licence(LICENCE_ADMIN))121 if($this->System->User->Licence(LICENCE_ADMIN)) 122 122 { 123 123 $Output .= … … 156 156 function Edit() 157 157 { 158 global $User; 159 160 if($User->Licence(LICENCE_ADMIN)) 158 if($this->System->User->Licence(LICENCE_ADMIN)) 161 159 { 162 160 if(array_key_exists('id', $_GET)) … … 182 180 function EditSave() 183 181 { 184 global $User; 185 186 if($User->Licence(LICENCE_ADMIN)) 182 if($this->System->User->Licence(LICENCE_ADMIN)) 187 183 { 188 184 if($_POST['Parent'] == '') $_POST['Parent'] = null; -
trunk/Modules/Team/Team.php
r575 r577 27 27 } 28 28 29 include_once(' img_level.php');29 include_once('../../img_level.php'); 30 30 31 31 class PageTeam extends Page … … 33 33 function ShowTeamList() 34 34 { 35 global $Config, $User;36 37 35 $Output = '<h3>Seznam překladatelských týmů</h3>'; 38 36 $Output .= 'Týmy jsou seskupení překladatelů, kteří se hlásí k něčemu společnému jako např. WoW serveru, způsobu překladu, ke stejnému hernímu spolku, aj. Být členem týmu samo o sobě nemá žádný zásadní důsledek a spíše to může pomoci se lépe orientovat mezi překladateli někomu, kdo sestavuje export.<br/>'; 39 37 40 if($ User->Licence(LICENCE_USER))38 if($this->System->User->Licence(LICENCE_USER)) 41 39 $Output .= '<br /><div style="text-align: center;"><a href="?action=create">Vytvořit překladatelský tým</a></div><br/>'; 42 40 … … 55 53 array('Name' => 'TimeCreate', 'Title' => 'Datum založení'), 56 54 ); 57 if($ User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce');55 if($this->System->User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce'); 58 56 59 57 $Order = GetOrderTableHeader($TableColumns, 'NumberUser', 1); … … 75 73 '<td><a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a></td>'. 76 74 '<td>'.HumanDate($Team['TimeCreate']).'</td>'; 77 if($ User->Licence(LICENCE_USER))78 { 79 if($Team['Leader'] == $ User->Id) $Action = ' <a href="?action=modify&id='.$Team['Id'].'">Upravit</a>';75 if($this->System->User->Licence(LICENCE_USER)) 76 { 77 if($Team['Leader'] == $this->System->User->Id) $Action = ' <a href="?action=modify&id='.$Team['Id'].'">Upravit</a>'; 80 78 else $Action = ''; 81 if($Team['Id'] == $ User->Team) $Action = ' <a href="?action=leave">Opustit</a>';79 if($Team['Id'] == $this->System->User->Team) $Action = ' <a href="?action=leave">Opustit</a>'; 82 80 $Output .= '<td><a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit</a>'.$Action.'</td>'; 83 81 } … … 92 90 function TeamJoin() 93 91 { 94 global $User; 95 96 if($User->Licence(LICENCE_USER)) 92 if($this->System->User->Licence(LICENCE_USER)) 97 93 { 98 94 if(array_key_exists('id', $_GET)) 99 95 { 100 $this->Database->query('UPDATE `User` SET `Team` = '.$_GET['id'].' WHERE `ID` = '.$ User->Id);96 $this->Database->query('UPDATE `User` SET `Team` = '.$_GET['id'].' WHERE `ID` = '.$this->System->User->Id); 101 97 $Output = ShowMessage('Vstoupil jsi do týmu.'); 102 98 WriteLog('Uživatel vstoupil do týmu '.$_GET['id'], LOG_TYPE_USER); … … 116 112 function TeamCreateFinish() 117 113 { 118 global $User;119 120 114 $Output = ''; 121 if($ User->Licence(LICENCE_USER))115 if($this->System->User->Licence(LICENCE_USER)) 122 116 { 123 117 if(array_key_exists('Name', $_POST) and array_key_exists('Description', $_POST)) … … 130 124 $this->Database->query('INSERT INTO `Team` (`Name` ,`Description`, `URL`, `TimeCreate`, `Leader`)'. 131 125 ' VALUES ("'.trim($_POST['Name']).'", "'.trim($_POST['Description']).'", "'. 132 $_POST['URL'].'", NOW(), '.$ User->Id.')');133 $this->Database->query('UPDATE `User` SET `Team` = '.$this->Database->insert_id.' WHERE `ID` = '.$ User->Id);126 $_POST['URL'].'", NOW(), '.$this->System->User->Id.')'); 127 $this->Database->query('UPDATE `User` SET `Team` = '.$this->Database->insert_id.' WHERE `ID` = '.$this->System->User->Id); 134 128 $Output .= ShowMessage('Překladatelský tým vytvořen.'); 135 129 WriteLog('Překladatelský tým vytvořen '.$_POST['Name'], LOG_TYPE_USER); … … 146 140 function TeamModify() 147 141 { 148 global $User; 149 150 if($User->Licence(LICENCE_USER)) 142 if($this->System->User->Licence(LICENCE_USER)) 151 143 { 152 144 if(array_key_exists('id', $_GET)) 153 145 { 154 $DbResult = $this->Database->query('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$ User->Id);146 $DbResult = $this->Database->query('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$this->System->User->Id); 155 147 if($DbResult->num_rows > 0) 156 148 { … … 171 163 function TeamModifyFinish() 172 164 { 173 global $User;174 175 165 $Output = ''; 176 if($ User->Licence(LICENCE_USER))166 if($this->System->User->Licence(LICENCE_USER)) 177 167 { 178 168 if(array_key_exists('id', $_GET) and array_key_exists('Name', $_POST) and array_key_exists('Description', $_POST) and array_key_exists('URL', $_POST)) 179 169 { 180 $DbResult = $this->Database->query('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$ User->Id);170 $DbResult = $this->Database->query('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$this->System->User->Id); 181 171 if($DbResult->num_rows > 0) 182 172 { … … 200 190 function TeamCreate() 201 191 { 202 global $User; 203 204 if($User->Licence(LICENCE_USER)) 192 if($this->System->User->Licence(LICENCE_USER)) 205 193 { 206 194 $Output ='<form action="?action=finish_create" method="post">'. … … 217 205 function TeamShow() 218 206 { 219 global $User, $Config;220 221 207 $Output = ''; 222 208 if(array_key_exists('id', $_GET) and is_numeric($_GET['id'])) … … 243 229 'Popis: '.$Team['Description'].'<br /><br />'; 244 230 //$Output .= '<a href="export/?team='.$Team['Id'].'">Exportovat překlad týmu</a> '; 245 if($ User->Licence(LICENCE_USER))231 if($this->System->User->Licence(LICENCE_USER)) 246 232 $Output .='<a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit do týmu</a><br /><br />'; 247 233 $Output .='<fieldset><legend>Statistika</legend>'. 248 234 'Počet členů týmu: <a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a><br />'. 249 235 'Počet přeložených textů týmu: <strong>'.$Team['NumberTranslate'].'</strong><br />'. 250 'Průměrná úroveň překladatelů v týmu: <img src=" tmp/team/'.$Team['Name'].'/level.png" /><br /><br />'.251 '<strong>Stav dokončení týmu pro verzi '.$ Config['Web']['GameVersion'].'</strong><br />';252 253 $BuildNumber = GetBuildNumber($ Config['Web']['GameVersion']);236 'Průměrná úroveň překladatelů v týmu: <img src="'.$this->System->Link('/tmp/team/'.$Team['Name'].'/level.png').'" /><br /><br />'. 237 '<strong>Stav dokončení týmu pro verzi '.$this->System->Config['Web']['GameVersion'].'</strong><br />'; 238 239 $BuildNumber = GetBuildNumber($this->System->Config['Web']['GameVersion']); 254 240 255 241 $GroupListQuery = 'SELECT `Group`.* FROM `Group`'; … … 263 249 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 264 250 'WHERE (`User` IN (SELECT `ID` FROM `User` WHERE `Team` = '.$Team['Id'].')) '. 265 'AND (`Complete` = 1) AND (`T`.`Language`!='.$ Config['OriginalLanguage'].') '.251 'AND (`Complete` = 1) AND (`T`.`Language`!='.$this->System->Config['OriginalLanguage'].') '. 266 252 'AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 267 253 ') AS `C1`) AS `Translated`, '. 268 254 '(SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 269 255 'SELECT `T`.`Entry` FROM `'.$DbRow['TablePrefix'].'` AS `T` '. 270 'WHERE (`Language` = '.$ Config['OriginalLanguage'].') '.256 'WHERE (`Language` = '.$this->System->Config['OriginalLanguage'].') '. 271 257 'AND (`VersionStart` <= '.$BuildNumber.') AND (`VersionEnd` >= '.$BuildNumber.')'. 272 258 ') AS `C2`) AS `Total`, "'.$DbRow['Name'].'" AS `Name` UNION '; … … 312 298 function TeamLeave() 313 299 { 314 global $User; 315 316 if($User->Licence(LICENCE_USER)) 317 { 318 $this->Database->query('UPDATE `User` SET `Team` = NULL WHERE `ID` = '.$User->Id); 300 if($this->System->User->Licence(LICENCE_USER)) 301 { 302 $this->Database->query('UPDATE `User` SET `Team` = NULL WHERE `ID` = '.$this->System->User->Id); 319 303 $Output = ShowMessage('Nyní nejste členem žádného týmu.'); 320 304 WriteLog('Uživatel vystoupil z týmu', LOG_TYPE_USER); -
trunk/Modules/Translation/Form.php
r569 r577 30 30 function ShowForm() 31 31 { 32 global $ System, $Config, $User, $TranslationTree;32 global $TranslationTree; 33 33 34 34 $Output = ''; … … 43 43 $TextID = $_GET['ID'] * 1; 44 44 45 $DbResult = $ System->Database->query('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$TextID);45 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE `ID` = '.$TextID); 46 46 $Line = $DbResult->fetch_assoc(); 47 47 if(!$Line) … … 49 49 $Output .= ShowMessage('Překlad nenalezen.', MESSAGE_CRITICAL); 50 50 } else 51 { 52 53 $DbResult = $System->Database->query('SELECT * FROM `'.$Table.'` WHERE (`Language` = '.$Config['OriginalLanguage'].') AND (`Entry` = '.$Line['Entry'].') AND (`VersionEnd` = '.$Line['VersionEnd'].') LIMIT 1'); 51 { 52 $DbResult = $this->Database->query('SELECT * FROM `'.$Table.'` WHERE '. 53 '(`Language` = '.$this->System->Config['OriginalLanguage'].') AND '. 54 '(`Entry` = '.$Line['Entry'].') AND (`VersionEnd` = '.$Line['VersionEnd'].') LIMIT 1'); 54 55 $LineAJ = $DbResult->fetch_assoc(); 55 56 if(!$LineAJ) … … 61 62 if($Line['User'] != '') 62 63 { 63 $IDUser = $ System->Database->query('SELECT * FROM `User` WHERE `ID` = '.$Line['User']);64 $IDUser = $this->Database->query('SELECT * FROM `User` WHERE `ID` = '.$Line['User']); 64 65 $LineUser = $IDUser->fetch_array(); 65 66 } else … … 72 73 if(($Line['Take'] <> 0) and ($Line['Take'] <> $Line['ID'])) 73 74 { 74 $DbResult = $ System->Database->query('SELECT `Language`,`VersionStart`,`VersionEnd` FROM `'.$Table.'` WHERE `ID` = '.$Line['Take']);75 $DbResult = $this->Database->query('SELECT `Language`,`VersionStart`,`VersionEnd` FROM `'.$Table.'` WHERE `ID` = '.$Line['Take']); 75 76 $Language = $DbResult->fetch_assoc(); 76 77 // echo $Language['Language'].' '.$Line['Take']; 77 78 78 $DbResult = $ System->Database->query('SELECT `Name` FROM `Language` WHERE `Id` ='.$Language['Language']);79 $DbResult = $this->Database->query('SELECT `Name` FROM `Language` WHERE `Id` ='.$Language['Language']); 79 80 $Lang = $DbResult->fetch_assoc(); 80 81 81 82 $Output .= 'Původní text: <strong>'. 82 83 84 83 ' ID <a href="form.php?group='.$GroupId.'&ID='.$Line['Take'].'">'.$Line['Take'].'</a></strong>'. 84 ' ('.$Lang['Name'].')'. 85 ' <br />'; 85 86 } 86 87 $Output .= 'Text: '; … … 95 96 '<br />'; 96 97 97 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`Language` <> '.$Config['OriginalLanguage'].') AND (`Complete` = 1)'); 98 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `'.$Table.'` WHERE '. 99 '(`Entry` = '.$Line['Entry'].') AND (`Language` <> '.$this->System->Config['OriginalLanguage'].') AND (`Complete` = 1)'); 98 100 $Version = $DbResult->fetch_row(); 99 101 $Version = $Version[0]; 100 102 if($Version > 0) 101 103 { 102 $Output .= '<form action="comparison.php" method="get"><a href="TranslationList.php?group='.$GroupId.'&user=0&state=2&entry='.$Line['Entry'].'&text=">Počet verzí: <strong>'.$Version.'</strong></a> 104 $Output .= '<form action="comparison.php" method="get"><a href="TranslationList.php?group='. 105 $GroupId.'&user=0&state=2&entry='.$Line['Entry'].'&text=">Počet verzí: <strong>'.$Version.'</strong></a> 103 106 <input type="hidden" name="group" value="'.$GroupId.'" /> 104 107 <input type="hidden" name="entry" value="'.$Line['Entry'].'" /> … … 107 110 <option value="-1">Vyberte text k porovnání</option> 108 111 <option value="-1">Zobrazit/porovnat všechny</option>'; 109 $DataID = $ System->Database->query('SELECT *, (SELECT `User`.`Name` AS `UserName` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`ID` <> '.$Line['ID'].') AND (`Complete` = 1)');112 $DataID = $this->Database->query('SELECT *, (SELECT `User`.`Name` AS `UserName` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`ID` <> '.$Line['ID'].') AND (`Complete` = 1)'); 110 113 while($Version = $DataID->fetch_array()) 111 114 { 112 if($Version['ID'] == $Line['Take']) $Output .= '<option value="'.$Version['ID'].'">'.$Version['ID'].' - '.$Version['User'].' (převzato)</option>'; 115 if($Version['ID'] == $Line['Take']) $Output .= '<option value="'. 116 $Version['ID'].'">'.$Version['ID'].' - '.$Version['User'].' (převzato)</option>'; 113 117 else 114 118 { … … 122 126 } else 123 127 { 124 $Output .= '<a href="TranslationList.php?group='.$GroupId.'&user=0&state=2&entry='.$Line['Entry'].'&text=">Počet verzí: <strong>'.$Version.'</strong></a>'; 128 $Output .= '<a href="TranslationList.php?group='.$GroupId.'&user=0&state=2&entry='. 129 $Line['Entry'].'&text=">Počet verzí: <strong>'.$Version.'</strong></a>'; 125 130 } 126 131 127 132 // Special characters: $B - New line, $N - Name, $C - profession 128 if($ User->Licence(LICENCE_USER))133 if($this->System->User->Licence(LICENCE_USER)) 129 134 { 130 135 $Output .= '<form action="save.php?group='.$GroupId.'" method="post"><div>'; … … 143 148 144 149 $Output .= '<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" /> 145 <input type="hidden" name="user" value="'.$ User->Id.'" />150 <input type="hidden" name="user" value="'.$this->System->User->Id.'" /> 146 151 <input type="hidden" name="ID" value="'.$TextID.'" /> 147 152 <table class="BaseTable"> … … 156 161 <td>'; 157 162 if($Line['Language'] <> 0) $Language = $Line['Language']; 158 else if($ User->Id != 0)159 { 160 $Language = $ User->Language;163 else if($this->System->User->Id != 0) 164 { 165 $Language = $this->System->User->Language; 161 166 } else $Language = 0; 162 if($ User->Licence(LICENCE_USER)) $Output .= WriteLanguages($Language);167 if($this->System->User->Licence(LICENCE_USER)) $Output .= WriteLanguages($Language); 163 168 else { 164 $DbResult3 = $ System->Database->select('Language', '`Id`, `Name`', '`Enabled` = 1');169 $DbResult3 = $this->Database->select('Language', '`Id`, `Name`', '`Enabled` = 1'); 165 170 if($DbResult3->num_rows > 0) 166 171 { … … 180 185 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) { 181 186 //<span class="edit">barvou.</span> 182 $names = GetTranslatNames($Text, 0,array('Dictionary' => 'Text','TextCreature' => 'name'));187 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text', 'TextCreature' => 'name')); 183 188 } else { 184 $names = GetTranslatNames($Text, 0,array('Dictionary' => 'Text'));189 $names = GetTranslatNames($Text, 0, array('Dictionary' => 'Text')); 185 190 } 186 191 … … 190 195 if(($LineAJ[$TextItem['Column']] <> '') or ($Line[$TextItem['Column']] <> '')) 191 196 { 192 if ($TextItem['Name'] == 'Text' AND (($Table == 'global_strings') OR($Table == 'glue_strings')))197 if(($TextItem['Name'] == 'Text') and (($Table == 'global_strings') or ($Table == 'glue_strings'))) 193 198 $Output .= '<tr><th>'.$LineAJ['ShortCut'].'</th>'; 194 199 else $Output .= '<tr><th>'.$TextItem['Name'].'</th>'; 195 200 $Output .= '<td>'.str_replace("\n", '<br/>', $this->ColorNames(htmlspecialchars($LineAJ[$TextItem['Column']]),$names)).'</td> 196 201 <td>'; 197 if($User->Licence(LICENCE_USER)) $Output .= '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">'; 202 if($this->System->User->Licence(LICENCE_USER)) 203 $Output .= '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="'.$TextItem['Column'].'" name="'.$TextItem['Column'].'">'; 198 204 $Output .= htmlspecialchars($Line[$TextItem['Column']]); 199 if($ User->Licence(LICENCE_USER)) $Output .= '</textarea></td></tr>';205 if($this->System->User->Licence(LICENCE_USER)) $Output .= '</textarea></td></tr>'; 200 206 } 201 207 } else … … 204 210 } 205 211 $Output .= '</table></div>'; 206 if($ User->Licence(LICENCE_USER)) $Output .= '</form>';212 if($this->System->User->Licence(LICENCE_USER)) $Output .= '</form>'; 207 213 } 208 214 } … … 213 219 function Delete() 214 220 { 215 global $System, $User, $Config; 216 217 if($User->Licence(LICENCE_MODERATOR)) 221 if($this->System->User->Licence(LICENCE_MODERATOR)) 218 222 { 219 223 $TextID = $_GET['ID']; 220 $ System->Database->query('DELETE FROM `'.$Table.'` WHERE `ID` = '.$TextID.' AND `Language` <> '.$Config['OriginalLanguage']);224 $this->Database->query('DELETE FROM `'.$Table.'` WHERE `ID` = '.$TextID.' AND `Language` <> '.$this->System->Config['OriginalLanguage']); 221 225 $Output = ShowMessage('Překlad byl smazán.'); 222 226 WriteLog('Překlad byl smazán! <a href="form.php?group='.$GroupID.'&ID='.$TextID.'">'.$TextID.'</a>', LOG_TYPE_MODERATOR); -
trunk/Modules/Translation/TranslationList.php
r561 r577 5 5 function ShowFilter($GroupId = 0) 6 6 { 7 global $ System, $TranslationTree, $Config;7 global $TranslationTree; 8 8 9 9 $Filter = array('SQL' => ''); … … 59 59 else $Selected = ''; 60 60 $Output .= '<option value="0"'.$Selected.'>Všechny</option>'; 61 $DbResult = $ System->Database->query('SELECT `Id`,`Name` FROM `Group` ORDER BY `Name`');61 $DbResult = $this->Database->query('SELECT `Id`,`Name` FROM `Group` ORDER BY `Name`'); 62 62 while($Group = $DbResult->fetch_assoc()) 63 63 { … … 72 72 if($Filter['Version'] != 0) 73 73 { 74 $DbResult = $ System->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE (`Imported` = 1) AND (`Id` ='.$Filter['Version'].')');74 $DbResult = $this->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE (`Imported` = 1) AND (`Id` ='.$Filter['Version'].')'); 75 75 if($DbResult->num_rows > 0) 76 76 { … … 83 83 else $Selected = ''; 84 84 $Output .= '<option value="0"'.$Selected.'>Všechny</option>'; 85 $DbResult = $ System->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE `Imported` = 1 ORDER BY `BuildNumber` DESC');85 $DbResult = $this->Database->query('SELECT `Id`, `BuildNumber`,`Version` FROM `ClientVersion` WHERE `Imported` = 1 ORDER BY `BuildNumber` DESC'); 86 86 while($Version = $DbResult->fetch_assoc()) 87 87 { … … 101 101 else $Selected = ''; 102 102 $Output .= '<option value="0"'.$Selected.'>Všechny</option>'; 103 $DbResult = $ System->Database->query('SELECT `Id`, `Name` FROM `Language` WHERE `Enabled` = 1 ORDER BY `Name`');103 $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `Language` WHERE `Enabled` = 1 ORDER BY `Name`'); 104 104 while($Language = $DbResult->fetch_assoc()) 105 105 { … … 118 118 else $Selected = ''; 119 119 $Output .= '<option value="0"'.$Selected.'>Všichni</option>'; 120 $DbResult = $ System->Database->query('SELECT `Id`, `Name` FROM `User` ORDER BY `Name`');120 $DbResult = $this->Database->query('SELECT `Id`, `Name` FROM `User` ORDER BY `Name`'); 121 121 while($User = $DbResult->fetch_assoc()) 122 122 { … … 153 153 { 154 154 if($Filter['State'] == 0) $Filter['SQL'] .= $UserFilter.$VersionFilter.''; 155 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$ Config['OriginalLanguage'].') '.155 else if($Filter['State'] == 1) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].') '. 156 156 'AND NOT EXISTS(SELECT 1 FROM `'.$Table.'` AS `Sub` WHERE '. 157 '(`Sub`.`Language` <> '.$ Config['OriginalLanguage'].')'.$LanguageFilter.$UserFilter.157 '(`Sub`.`Language` <> '.$this->System->Config['OriginalLanguage'].')'.$LanguageFilter.$UserFilter. 158 158 ' AND (`Sub`.`Entry` = `T`.`Entry`) AND (`Sub`.`Complete` = 1) AND '. 159 159 '(`Sub`.`VersionStart` = `T`.`VersionStart`) AND (`Sub`.`VersionEnd` = `T`.`VersionEnd`))'; 160 160 else if($Filter['State'] == 2) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Complete` = 1)'; 161 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Language` != '.$ Config['OriginalLanguage'].161 else if($Filter['State'] == 3) $Filter['SQL'] .= $UserFilter.$LanguageFilter.$VersionFilter.' AND (`T`.`Language` != '.$this->System->Config['OriginalLanguage']. 162 162 ') AND (`T`.`Complete` = 0)'; 163 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$ Config['OriginalLanguage'].')';163 else if($Filter['State'] == 4) $Filter['SQL'] .= $VersionFilter.' AND (`T`.`Language` = '.$this->System->Config['OriginalLanguage'].')'; 164 164 } 165 165 … … 191 191 function ShowTranslationList($Filter) 192 192 { 193 global $ System, $TranslationTree;193 global $TranslationTree; 194 194 195 195 $Output = $Filter['Output']; … … 208 208 209 209 // Get total item count 210 $DbResult = $ System->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`');210 $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS `TT`'); 211 211 $DbRow = $DbResult->fetch_row(); 212 212 $PageList = GetPageList($DbRow[0]); … … 226 226 $Order['Output']; 227 227 228 $DbResult = $ System->Database->query($Query.' '.$Order['SQL'].' '.$PageList['SQLLimit']);228 $DbResult = $this->Database->query($Query.' '.$Order['SQL'].' '.$PageList['SQLLimit']); 229 229 while($Line = $DbResult->fetch_assoc()) 230 230 { … … 243 243 function ShowGroupList($Filter) 244 244 { 245 global $ System, $TranslationTree;245 global $TranslationTree; 246 246 247 247 $Output = $Filter['Output']; … … 253 253 { 254 254 $Filter = $this->ShowFilter($Group['Id']); 255 $ID = $ System->Database->query('SELECT COUNT(*) FROM `'.$Group['TablePrefix'].'` AS `T` WHERE 1 '.$Filter['SQL']);255 $ID = $this->Database->query('SELECT COUNT(*) FROM `'.$Group['TablePrefix'].'` AS `T` WHERE 1 '.$Filter['SQL']); 256 256 $Line = $ID->fetch_row(); 257 257 $Output .= '<tr><td><a href="?group='.$Group['Id'].'">'.$Group['Name'].'</td><td>'.$Line[0].'</a></tr>'; … … 265 265 function ShowGroupTypeList() 266 266 { 267 global $System, $User; 268 269 $DbResult = $System->Database->query('SELECT COUNT(*) FROM `Group`'); 267 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Group`'); 270 268 $DbRow = $DbResult->fetch_row(); 271 269 $PageList = GetPageList($DbRow[0]); … … 285 283 $Output .= $Order['Output']; 286 284 287 $DbResult = $ System->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']);285 $DbResult = $this->Database->query('SELECT * FROM `Group`'.$Order['SQL'].$PageList['SQLLimit']); 288 286 while($Group = $DbResult->fetch_assoc()) 289 287 { … … 297 295 $Output .= '</table>'. 298 296 '<br /><a title="Záznam změn po importu" href="log.php?type=11">Záznam změn v textech při importu</a><br/>'; 299 if($ User->Licence(LICENCE_ADMIN)) $Output .= '<a href="?action=groupadd">Přidat překladovou skupinu</a>';297 if($this->System->User->Licence(LICENCE_ADMIN)) $Output .= '<a href="?action=groupadd">Přidat překladovou skupinu</a>'; 300 298 return($Output); 301 299 } … … 303 301 function ShowMenu() 304 302 { 305 global $ User, $TranslationTree;303 global $TranslationTree; 306 304 307 305 $GroupId = GetParameter('group', 0, true); … … 321 319 '<td>Texty označené jako rozpracované.</td></tr>'; 322 320 323 if($ User->Licence(LICENCE_USER))321 if($this->System->User->Licence(LICENCE_USER)) 324 322 { 325 $Output .= '<tr><td><a title="Nedokončené texty" href="?group='.$GroupId.'&state=3&user='.$ User->Id.'">Moje nedokončené</a></td>323 $Output .= '<tr><td><a title="Nedokončené texty" href="?group='.$GroupId.'&state=3&user='.$this->System->User->Id.'">Moje nedokončené</a></td> 326 324 <td>Nedokončené texty přihlášeného uživatele</td></tr> 327 <tr><td><a title="Přeložené texty přihlášeného uživatele" href="?group='.$GroupId.'&state=2&user='.$ User->Id.'">Moje přeložené</a></td>325 <tr><td><a title="Přeložené texty přihlášeného uživatele" href="?group='.$GroupId.'&state=2&user='.$this->System->User->Id.'">Moje přeložené</a></td> 328 326 <td>Přeložené texty přihlášeného uživatele</td></tr>'; 329 327 } … … 348 346 function ShowGroupAdd() 349 347 { 350 global $User; 351 352 if($User->Licence(LICENCE_ADMIN)) 348 if($this->System->User->Licence(LICENCE_ADMIN)) 353 349 { 354 350 $Output = '<h3>Vložení nové překladové skupiny</h3>'. … … 368 364 function ShowGroupAddFinish() 369 365 { 370 global $User; 371 372 if($User->Licence(LICENCE_ADMIN)) 366 if($this->System->User->Licence(LICENCE_ADMIN)) 373 367 { 374 368 // TODO: Add group items manipulation oprations -
trunk/Modules/User/Options.php
r569 r577 5 5 function UserOptionsFrom() 6 6 { 7 global $User;8 9 7 $Output = '<form action="Options.php?action=save" method="post"> 10 8 <fieldset><legend>Nastavení uživatele</legend> 11 9 <table> 12 <tr><td>Email:</td><td><input type="text" name="Email" value="'.$ User->Email.'" /></td></tr>10 <tr><td>Email:</td><td><input type="text" name="Email" value="'.$this->System->User->Email.'" /></td></tr> 13 11 <tr><td>Původní heslo:</td><td><input type="password" name="OldPass" /></td></tr> 14 12 <tr><td>Nové heslo:</td><td><input type="password" name="NewPass" /></td></tr> 15 13 <tr><td>Nové heslo pro potvrzení: </td><td><input type="password" name="NewPass2" /></td></tr> 16 <tr><td>Normálně budu překládat do: </td><td>'.WriteLanguages($ User->Language).'</td></tr>14 <tr><td>Normálně budu překládat do: </td><td>'.WriteLanguages($this->System->User->Language).'</td></tr> 17 15 <tr><td>Po uložení překladu přesměrovat: </td><td>'; 18 16 $Output .= '<select name="redirecting">'. 19 17 '<option value="0">Nikam</option>'. 20 18 '<option value="1"'; 21 if($ User->Redirecting == '1') $Output .= ' selected="selected"';19 if($this->System->User->Redirecting == '1') $Output .= ' selected="selected"'; 22 20 $Output .= '>Na nepřeložené</option>'; 23 21 $Output .= '<option value="2"'; 24 if($ User->Redirecting == '2') $Output .= ' selected="selected"';22 if($this->System->User->Redirecting == '2') $Output .= ' selected="selected"'; 25 23 $Output .= '>Na další překlad</option>'; 26 24 $Output .= '<option value="3"'; 27 if($ User->Redirecting == '3') $Output .= ' selected="selected"';25 if($this->System->User->Redirecting == '3') $Output .= ' selected="selected"'; 28 26 $Output .= '>Na předchozí překlad</option>'; 29 27 $Output .= '</select>'; 30 28 31 29 $Output .= '</td></tr>'. 32 '<tr><td>Upřednostněná verze klienta: </td><td>'.ClientVersionSelection($ User->PreferredVersion).'</td></tr>'.30 '<tr><td>Upřednostněná verze klienta: </td><td>'.ClientVersionSelection($this->System->User->PreferredVersion).'</td></tr>'. 33 31 '<tr><td>Veřejný text profilu:</td><td>'. 34 '<textarea name="info" cols="60" rows="10">'.$ User->Info.'</textarea></td></tr>'.32 '<textarea name="info" cols="60" rows="10">'.$this->System->User->Info.'</textarea></td></tr>'. 35 33 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 36 34 '</table></fieldset>'. … … 47 45 { 48 46 $Output .= '<option value="'.$LineTeam['Id'].'"'; 49 if ($LineTeam['Id'] == $ User->Team) $Output .= ' selected="selected"';47 if ($LineTeam['Id'] == $this->System->User->Team) $Output .= ' selected="selected"'; 50 48 $Output .= '>'.$LineTeam['Name'].'</option>'; 51 49 } … … 58 56 function UserOptionsSave() 59 57 { 60 global $User;61 62 58 $Output = ''; 63 59 if(array_key_exists('Email', $_POST)) … … 78 74 if($NewPass == $NewPass2) 79 75 { 80 $DbResult = $System->Database->query('SELECT `Pass`, '.$ User->CryptPasswordSQL('"'.$OldPass.'"', '`Salt`').' AS `Hash` FROM `User` WHERE `ID`= '.$User->Id);76 $DbResult = $System->Database->query('SELECT `Pass`, '.$this->System->User->CryptPasswordSQL('"'.$OldPass.'"', '`Salt`').' AS `Hash` FROM `User` WHERE `ID`= '.$this->System->User->Id); 81 77 $DbRow = $DbResult->fetch_assoc(); 82 78 if($DbRow['Hash'] == $DbRow['Pass']) 83 79 { 84 80 // Update password 85 $Salt = $ User->GetPasswordSalt();86 $this->Database->query('UPDATE `User` SET `Pass` = '.$ User->CryptPasswordSQL('"'.$NewPass.'"', '"'.$Salt.'"').', `Salt`="'.$Salt.'" WHERE `ID` = '.$User->Id);81 $Salt = $this->System->User->GetPasswordSalt(); 82 $this->Database->query('UPDATE `User` SET `Pass` = '.$this->System->User->CryptPasswordSQL('"'.$NewPass.'"', '"'.$Salt.'"').', `Salt`="'.$Salt.'" WHERE `ID` = '.$this->System->User->Id); 87 83 $Output .= ShowMessage('Heslo změněno.'); 88 84 } else $Output .= ShowMessage('Staré heslo neodpovídá.', MESSAGE_CRITICAL); 89 85 } else $Output .= ShowMessage('Hesla se neshodují.', MESSAGE_CRITICAL); 90 86 } 91 $this->Database->update('User', '`ID` = '.$ User->Id, array('Email' => $Email,92 93 94 $Output .= ShowMessage('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$ User->Name.'</b>');87 $this->Database->update('User', '`ID` = '.$this->System->User->Id, array('Email' => $Email, 88 'Language' => $Language, 'Redirecting' => $Redirecting, 'Info' => $Info, 89 'PreferredVersion' => $PreferredVersion)); 90 $Output .= ShowMessage('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$this->System->User->Name.'</b>'); 95 91 WriteLog('Úprava nastavení!', LOG_TYPE_USER); 96 $ User->Load();92 $this->System->User->Load(); 97 93 } else $Output .= ShowMessage('Nezadány údaje.', MESSAGE_CRITICAL); 98 94 return($Output); -
trunk/Modules/User/Profile.php
r572 r577 5 5 function SendMail() 6 6 { 7 global $Config, $User;8 9 7 $Output = ''; 10 8 if(array_key_exists('text', $_POST)) 11 if($ User->Licence(LICENCE_ADMIN))9 if($this->System->User->Licence(LICENCE_ADMIN)) 12 10 { 13 11 $Text = $_POST['text']; … … 18 16 'Text: <strong>'.$Text.'</strong><br />'; 19 17 20 if(@mail($Email, $Subject, $Text, 'From: '.$ Config['Web']['AdminEmail'].'\nReply-To: '.$Config['Web']['AdminEmail'].'\nX-Mailer: PHP/'))18 if(@mail($Email, $Subject, $Text, 'From: '.$this->System->Config['Web']['AdminEmail'].'\nReply-To: '.$this->System->Config['Web']['AdminEmail'].'\nX-Mailer: PHP/')) 21 19 { 22 20 $Output .= ShowMessage('Zpráva byla odeslána.'); -
trunk/Modules/User/User.php
r563 r577 21 21 function Start() 22 22 { 23 global $User; 24 23 25 $this->System->User = new User($this->System); 24 26 $this->System->RegisterPage('userlist.php', 'PageUserList'); 25 27 $this->System->RegisterPage('Options.php', 'PageUserOptions'); 26 28 $this->System->RegisterPage('registrace.php', 'PageUserRegistration'); … … 87 89 $this->Id = $User['ID']; 88 90 $this->Load(); 89 WriteLog('Login: '.$Name, LOG_TYPE_USER);91 $this->System->ModuleManager->Modules['Log']->WriteLog('Login: '.$Name, LOG_TYPE_USER); 90 92 $this->UpdateState(); 91 93 } else $this->Role = LICENCE_ANONYMOUS; -
trunk/Modules/User/UserList.php
r547 r577 1 1 <?php 2 2 3 4 include_once('img_level.php'); 3 include_once(dirname(__FILE__).'/../../img_level.php'); 5 4 6 5 class PageUserList extends Page -
trunk/action.php
r569 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include_once('includes/global.php'); 4 5 function Search()6 {7 global $System, $TranslationTree, $Config;8 9 if(array_key_exists('search', $_GET)) $Search = $_GET['search'];10 else if(array_key_exists('search', $_POST)) $Search = $_POST['search'];11 else $Search = '';12 13 $Output = '<table class="BaseTable"><tr><th>Skupina</th><th>Výsledků</th></tr>';14 foreach($TranslationTree as $Group)15 {16 $Table = $Group['TablePrefix'];17 18 $sql = 'SELECT COUNT(*) FROM `'.$Table.'` WHERE '.19 ' (`ID` LIKE "%'.$Search.'%")'.20 ' OR (`Entry` LIKE "%'.$Search.'%")';21 foreach($Group['Items'] as $Item)22 {23 if($Item['Column'] != '') $sql .= ' OR `'.$Item['Column'].'` LIKE "%'.$Search.'%"';24 }25 $DbResult = $System->Database->query($sql);26 $Line = $DbResult->fetch_row();27 $Output .= '<tr><td><a href="TranslationList.php?group='.$Group['Id'].'&user=0&state=0&text='.$Search.'&entry=">'.$Group['Name'].'</a></td><td>'.$Line[0].'</td></tr>';28 }29 30 $DbResult = $System->Database->query('SELECT count(*) FROM `User` WHERE `Name` LIKE "%'.$Search.'%"');31 $Line = $DbResult->fetch_row();32 $Output .= '<tr><td><a href="userlist.php?search='.$Search.'">Uživatelé</a></td><td>'.$Line[0].'</td></tr>';33 34 $DbResult = $System->Database->query('SELECT count(*) FROM `Team` WHERE `Name` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%"');35 $Line = $DbResult->fetch_row();36 $Output .= '<tr><td><a href="team/?search='.$Search.'">Týmy</a></td><td>'.$Line[0].'</td></tr>';37 38 $DbResult = $System->Database->query('SELECT count(*) FROM `CzWoWPackageVersion` WHERE `Text` LIKE "%'.$Search.'%"');39 $Line = $DbResult->fetch_row();40 $Output .= '<tr><td><a href="download.php?addon">Čeština pro klienta</a></td><td>'.$Line[0].'</td></tr>';41 $Output .= '<tr><td><a href="aowow/?search='.$Search.'">Vyhledávací databáze AoWoW</a></td></tr>';42 43 $DbResult = $System->Database->query('SELECT count(*) FROM `Dictionary` WHERE (`Text` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%") AND `Language` = '.$Config['OriginalLanguage']);44 $Line = $DbResult->fetch_row();45 $Output .= '<tr><td><a href="dictionary/?search='.$Search.'">Slovníček</a></td><td>'.$Line[0].'</td></tr>';46 47 $Output .= '</table>';48 return($Output);49 }50 5 51 6 function DatabaseKit() … … 190 145 if(array_key_exists('action', $_GET)) $Action = $_GET['action']; 191 146 192 if($Action == 'search') $Output = Search();193 147 else if($Action == 'dbkit') $Output = DatabaseKit(); 194 148 else $Output = ShowMessage('Nebyla zadána žádná akce.', MESSAGE_CRITICAL); -
trunk/admin/index.php
r566 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include_once('../includes/global.php'); 4 5 include_once('../img_level.php'); … … 20 21 '<small>Ihned provede přegenerování všech obrázků úrovní překladatelů</small><br/><br/>'. 21 22 '<a href="'.$System->Link('/news/?a=add').'">Přidání aktuality</a><br/>'. 22 '<small>Přidá aktu litu na hlavní stranu projektu</small><br/><br/>'.23 '<small>Přidá aktualitu na hlavní stranu projektu</small><br/><br/>'. 23 24 '<a href="'.$System->Link('/admin/?action=testing').'">Testování</a><br/>'. 24 25 '<small>Testovací funkce</small><br/><br/>'; -
trunk/download.php
r553 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include('includes/global.php'); 4 5 -
trunk/img_statistic.php
r553 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include('includes/global.php'); 4 5 -
trunk/includes/Page.php
r566 r577 1 1 <?php 2 3 function ShowTopBar()4 {5 global $Config, $System, $User;6 7 $Output = '<div class="Menu">';8 if(!$User->Licence(LICENCE_USER))9 $Output .= '<div class="advert">'.$Config['Web']['Advertisement'].'</div>';10 $Output .= '<span class="MenuItem"></span>';11 if($User->Licence(LICENCE_USER))12 {13 //$DbResult = $System->Database->query('SELECT `Id`, `Name` FROM `Team` WHERE `Id`='.$User->Team);14 //$Team = $DbResult->fetch_assoc();15 //$Output .= ''<span class="MenuItem">Moje překlady: <a href="">Dokončené</a> <a href="">Rozpracované</a> <a href="">Exporty</a> Tým: <a href="">'.$Team['name'].'</a></span>';16 $Output .= '<span class="MenuItem2">'.$User->Name.' <a href="'.$System->Link('/?action=logout').'">Odhlášení</a>'.17 ' <a href="'.$System->Link('/user.php?user='.$User->Id).'">Moje stránka</a>'.18 ' <a href="'.$System->Link('/Options.php').'">Nastavení</a>'.19 ' <a title="Vámi přeložené texty" href="'.$System->Link('/TranslationList.php?user='.$User->Id.'&group=0&state=2&text=&entry=').'">Přeložené</a>'.20 ' <a title="Vaše rozpracované text" href="'.$System->Link('/TranslationList.php?user='.$User->Id.'&group=0&state=3&text=&entry=').'">Rozpracované</a>'.21 ' <a title="Nikým nepřeložené texty" href="'.$System->Link('/TranslationList.php?user=0&group=0&state=1&text=&entry=').'">Nepřeložené</a>'.22 '</span>';23 } else24 {25 $Output .= '<span class="MenuItem2"><form action="'.$System->Link('/?action=login').'" method="post"> '.26 'Jméno: <input type="text" name="LoginUser" size="8 " /> '.27 'Heslo: <td><input type="password" name="LoginPass" size="8" /> '.28 '<input type="submit" value="Přihlásit" /></form> '.29 '<a href="'.$System->Link('/registrace.php').'">Registrace</a></span>';30 }31 $Output .= '</div>';32 return($Output);33 }34 35 function ShowLoginBox()36 {37 global $User;38 39 $Output = '';40 if($User->Licence(LICENCE_USER))41 {42 // $Output .= 'Jste přihlášen jako: <b>'.$User->Id.'</b> <a href="index.php?Logout">Odhlásit</a>';43 } else44 {45 $Output .= '<strong>Přihlášení:</strong>46 <form action="" method="post">47 <table>48 <tr>49 <td><input type="text" name="LoginUser" size="13" /></td>50 </tr>51 <tr>52 <td><input type="password" name="LoginPass" size="13" /></td>53 </tr>54 <tr>55 <th><input type="submit" value="Přihlásit" /></th>56 </tr>57 </table>58 </form>';59 }60 return($Output);61 }62 63 function ShowSearchBox()64 {65 global $System;66 67 $Output = '<strong>Hledání:</strong>'.68 '<form action="'.$System->Link('/action.php').'" method="get"><div>'.69 '<input type="hidden" name="action" value="search" />'.70 '<table>'.71 '<tr>'.72 '<td><input type="text" name="search" size="13" /></td>'.73 '</tr>'.74 '<tr>'.75 '<th><input type="submit" value="Hledat" /></th>'.76 '</tr>'.77 '</table></div>'.78 '</form>';79 return($Output);80 }81 82 function ShowMainMenu()83 {84 global $Config, $User, $System;85 86 $Output = '<strong>Nabídka:</strong>'.87 '<div class="verticalmenu"><ul>';88 foreach($System->Menu as $MenuItem)89 if($User->Licence($MenuItem['Permission']))90 {91 if(isset($MenuItem['Click'])) $OnClick = ' onclick="'.$MenuItem['Click'].'"';92 else $OnClick = '';93 if($MenuItem['Icon'] != '') $Icon = '<img src="'.$System->Link('/images/menu/'.$MenuItem['Icon']).'"/>';94 else $Icon = '';95 $Output .= '<li>'.$Icon.'<a class="verticalmenua" title="'.$MenuItem['Hint'].'" href="'.96 $MenuItem['Link'].'"'.$OnClick.'>'.$MenuItem['Title'].'</a></li>';97 }98 $Output .= '</ul></div>';99 return($Output);100 }101 102 function ShowTranslatedMenu()103 {104 global $TranslationTree, $User, $System;105 106 $Output = '<strong>Překladové skupiny:</strong><br /><div id="TranslationMenu">';107 $DbResult = $System->Database->select('Group', '`Id`, `Name`', '1 ORDER BY `Name`');108 while($Group = $DbResult->fetch_assoc())109 {110 $Output .= '<div id="menuitem-group'.$Group['Id'].'" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">'.111 '<a href="'.$System->Link('/TranslationList.php?group='.$Group['Id'].'&action=filter').'">'.$Group['Name'].'</a></div>'.112 '<div id="group'.$Group['Id'].'" class="hidden-menu-item" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">';113 $Output .= ' <a title="Zde můžete začít překládat" href="'.$System->Link('/TranslationList.php?group='.$Group['Id'].'&state=1&user=0&entry=&text=').'">Nepřeložené</a><br />'.114 ' <a title="Přeložené texty, můžete zde hlasovat, nebo opravovat překlady" href="'.$System->Link('/TranslationList.php?group='.$Group['Id'].'&state=2&user=0&entry=&text=').'">Přeložené</a><br />';115 if($User->Licence(LICENCE_USER))116 {117 $Output .= ' <a title="Nedokončené překlady" href="'.$System->Link('/TranslationList.php?group='.$Group['Id'].'&state=3').'">Rozepsané</a><br />118 <a title="Všechny překlady, které jste přeložil" href="'.$System->Link('/TranslationList.php?group='.$Group['Id'].'&state=1&user='.$User->Id).'&entry=&text=">Vlastní</a><br />';119 }120 $Output .= ' <a title="Sestavit speciální filtr" href="'.$System->Link('/TranslationList.php?group='.$Group['Id'].'&action=filter').'">Filtr</a><br />';121 $Output .= '</div>';122 }123 $Output .= '</div>';124 return($Output);125 }126 127 function ShowHeader()128 {129 global $User, $System;130 131 $Output = '<?xml version="1.0" encoding="'.$System->Config['Web']['Charset'].'"?>132 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">133 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cz">'.134 '<head>'.135 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$System->Config['Web']['Charset'].'" />'.136 '<meta name="keywords" content="wow, quest, questy, questů, preklad, mangos, překlad, překládání, přeložený, přeložení, čeština, world of warcraft, open source, free, addon" />'.137 '<meta name="description" content="'.$System->Config['Web']['Title'].'" />'.138 '<meta name="robots" content="all" />'.139 '<link rel="stylesheet" href="'.$System->Link('/style/style.css').'" type="text/css" media="all" />'.140 '<script type="text/javascript" src="'.$System->Link('/style/global.js').'"></script>'.141 '<link rel="shortcut icon" href="'.$System->Link('/images/favicon.ico').'" />';142 foreach($System->RSSChannels as $Channel)143 {144 $Output .= ' <link rel="alternate" title="'.$Channel['Title'].'" href="'.145 $System->Link('/rss.php?channel='.$Channel['Channel']).'" type="application/rss+xml" />';146 }147 $Output .= '<title>'.$System->Config['Web']['Title'].'</title>148 </head>149 <body>';150 151 $Output .= ShowTopBar();152 $Output .= '<table class="page"><tr><td class="menu">';153 $Output .= ShowMainMenu();154 $Output .= $System->ModuleManager->Modules['User']->ShowOnlineList();155 $Output .= '<br />';156 $Output .= ShowSearchBox();157 $Output .= '</td><td id="border-left"></td><td class="content">';158 return($Output);159 }160 161 function ShowFooter()162 {163 global $System, $ScriptStartTime, $User, $Revision, $ReleaseTime;164 165 $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2);166 167 $Output = '</td>'.168 '<td class="menu2">';169 $Output .= ShowTranslatedMenu();170 $Output .= '</td>'.171 '</tr><tr>'.172 '<td colspan="4" class="page-bottom">Verze: '.$Revision.' ('.HumanDate($ReleaseTime).')'.173 ' <a href="http://svn.zdechov.net/trac/wowpreklad/browser/trunk">Zdrojové soubory</a> '.174 '<a href="http://svn.zdechov.net/trac/wowpreklad/log/trunk?verbose=on">Novinky</a> '.175 $System->Config['Web']['WebCounter'];176 177 $Output .= '</td></tr>';178 if($System->Config['Web']['ShowRuntimeInfo'] == true)179 $Output .= '<tr><td colspan="3" style="text-align: center;">Doba generování: '.$ScriptGenerateDuration.' s / '.ini_get('max_execution_time').' s Použitá paměť: '.HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B <a href="http://validator.w3.org/check?uri='.htmlentities('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?'.$_SERVER['QUERY_STRING']).'">HTML validator</a></td></tr>';180 $Output .= '</table>'.181 '</body>'.182 '</html>';183 $User->Store();184 return($Output);185 }186 187 function ShowPage($Content)188 {189 global $Config;190 191 $Output = ShowHeader().$Content.ShowFooter();192 //if($Config['Web']['FormatOutput']) $Output = FormatOutput($Output);193 echo($Output);194 }195 196 function FormatOutput($s)197 {198 $out = '';199 $nn = 0;200 $n = 0;201 while($s != '')202 {203 $start = strpos($s, '<');204 $end = strpos($s, '>');205 if($start != 0)206 {207 $end = $start - 1;208 $start = 0;209 }210 $line = trim(substr($s, $start, $end + 1));211 if(strlen($line) > 0)212 if($line[0] == '<')213 {214 if($s[$start + 1] == '/')215 {216 $n = $n - 2;217 $nn = $n;218 } else219 {220 if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1);221 else $cmd = substr($line, 1, strlen($line) - 2);222 //echo('['.$cmd.']');223 if(strpos($s, '</'.$cmd.'>')) $n = $n + 2;224 }225 }// else $line = '['.$line.']';226 //if($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n"));227 if($line != '') $out .= (str_repeat(' ', $nn).$line."\n");228 $s = substr($s, $end + 1, strlen($s));229 $nn = $n;230 }231 return($out);232 }233 2 234 3 class Page … … 253 22 { 254 23 $Output = $this->Show(); 255 if($this->RawPage == false) $Output = ShowPage($Output);256 else echo($Output);257 24 return($Output); 258 25 } -
trunk/includes/global.php
r573 r577 29 29 include_once(dirname(__FILE__).'/../Modules/News/News.php'); 30 30 include_once(dirname(__FILE__).'/../Modules/Wiki/Wiki.php'); 31 include_once(dirname(__FILE__).'/../Modules/Search/Search.php'); 31 32 include_once(dirname(__FILE__).'/../Modules/FrontPage/FrontPage.php'); 32 33 33 GlobalInit(); 34 $User = &$System->User; // Back compatibility 35 36 function GlobalInit() 37 { 38 global $System, $ScriptStartTime, $TranslationTree, $User, $StopAfterUpdateManager, 39 $UpdateManager, $Config, $DatabaseRevision; 40 41 $ScriptStartTime = GetMicrotime(); 42 43 if(isset($_SERVER['REMOTE_ADDR'])) session_start(); 44 45 if(!isset($Config)) die('Systém není nainstalován. Pokračujte v instalaci <a href="admin/install.php">zde</a>.'); 46 date_default_timezone_set($Config['Web']['Timezone']); 47 34 35 // Back compatibility, will be removed 36 if(isset($InitSystem) and $InitSystem) 37 { 48 38 $System = new System(); 49 $System->Init(); 50 51 // Check database persistence structure 52 $UpdateManager = new UpdateManager(); 53 $UpdateManager->Database = $System->Database; 54 $UpdateManager->Revision = $DatabaseRevision; 55 if(!$UpdateManager->IsInstalled()) die('Systém vyžaduje instalaci databáze.'); 56 if(!$UpdateManager->IsUpToDate()) die('Systém vyžaduje aktualizaci databáze.'); 57 58 // SQL injection hack protection 59 foreach($_POST as $Index => $Item) 60 { 61 if(is_array($_POST[$Index])) 62 foreach($_POST[$Index] as $Index2 => $Item2) $_POST[$Index][$Index2] = addslashes($Item2); 63 else $_POST[$Index] = addslashes($_POST[$Index]); 64 } 65 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($_GET[$Index]); 66 67 // TODO: Global initialized variable should be removed 68 $TranslationTree = GetTranslationTree(); 69 70 // Initialize application modules 71 $System->ModuleManager->RegisterModule(new ModuleError($System)); 72 $System->ModuleManager->Modules['Error']->ShowError = $Config['Web']['ShowPHPError']; 73 $System->ModuleManager->RegisterModule(new ModuleLog($System)); 74 $System->ModuleManager->RegisterModule(new ModuleUser($System)); 75 $System->ModuleManager->RegisterModule(new ModuleAoWoW($System)); 76 $System->ModuleManager->RegisterModule(new ModuleReferrer($System)); 77 $System->ModuleManager->Modules['Referrer']->Excluded[] = $System->Config['Web']['Host']; 78 $System->ModuleManager->RegisterModule(new ModuleTeam($System)); 79 $System->ModuleManager->RegisterModule(new ModuleDictionary($System)); 80 $System->ModuleManager->RegisterModule(new ModuleTranslation($System)); 81 $System->ModuleManager->RegisterModule(new ModuleImport($System)); 82 $System->ModuleManager->RegisterModule(new ModuleExport($System)); 83 $System->ModuleManager->RegisterModule(new ModuleServer($System)); 84 $System->ModuleManager->RegisterModule(new ModuleClientVersion($System)); 85 $System->ModuleManager->RegisterModule(new ModuleShoutBox($System)); 86 $System->ModuleManager->RegisterModule(new ModuleNews($System)); 87 $System->ModuleManager->RegisterModule(new ModuleWiki($System)); 88 $System->ModuleManager->RegisterModule(new ModuleFrontPage($System)); 89 $System->ModuleManager->StartAll(); 90 } 39 $System->DoNotShowPage = true; 40 $System->Run(); 41 } 42 43 class TempPage extends Page 44 { 45 function Show() 46 { 47 global $TempPageContent; 48 return($TempPageContent); 49 } 50 } 51 function ShowPage($Content) 52 { 53 global $TempPageContent, $System; 54 55 $TempPage = new TempPage($System); 56 $System->Pages['temporary-page'] = 'TempPage'; 57 $_SERVER['REDIRECT_QUERY_STRING'] = 'temporary-page'; 58 $TempPageContent = $Content; 59 $System->PathItems = ProcessURL(); 60 $System->ShowPage(); 61 } 62 91 63 92 64 function GetMicrotime() … … 634 606 635 607 $IconName = array( 636 MESSAGE_INFORMATION => 'information',608 MESSAGE_INFORMATION => 'information', 637 609 MESSAGE_WARNING => 'warning', 638 610 MESSAGE_CRITICAL => 'critical' -
trunk/includes/system.php
r573 r577 2 2 3 3 include_once('Database.php'); 4 5 class System 4 include_once('Application.php'); 5 6 class System extends Application 6 7 { 7 8 var $Database; … … 11 12 var $Menu; 12 13 var $RSSChannels; 14 var $DoNotShowPage; 13 15 14 16 function __construct() … … 17 19 $this->Menu = array(); 18 20 $this->RSSChannels = array(); 21 $this->DoNotShowPage = false; 19 22 } 20 23 … … 85 88 'Icon' => '', 86 89 ), 87 ); 90 ); 91 } 92 93 function Run() 94 { 95 global $System, $ScriptStartTime, $TranslationTree, $User, $StopAfterUpdateManager, 96 $UpdateManager, $Config, $DatabaseRevision; 97 98 $ScriptStartTime = GetMicrotime(); 99 100 if(isset($_SERVER['REMOTE_ADDR'])) session_start(); 101 102 if(!isset($Config)) die('Systém není nainstalován. Pokračujte v instalaci <a href="admin/install.php">zde</a>.'); 103 date_default_timezone_set($Config['Web']['Timezone']); 104 105 $this->Init(); 106 107 // Check database persistence structure 108 $UpdateManager = new UpdateManager(); 109 $UpdateManager->Database = $this->Database; 110 $UpdateManager->Revision = $DatabaseRevision; 111 if(!$UpdateManager->IsInstalled()) die('Systém vyžaduje instalaci databáze.'); 112 if(!$UpdateManager->IsUpToDate()) die('Systém vyžaduje aktualizaci databáze.'); 113 114 // SQL injection hack protection 115 foreach($_POST as $Index => $Item) 116 { 117 if(is_array($_POST[$Index])) 118 foreach($_POST[$Index] as $Index2 => $Item2) $_POST[$Index][$Index2] = addslashes($Item2); 119 else $_POST[$Index] = addslashes($_POST[$Index]); 120 } 121 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($_GET[$Index]); 88 122 123 // TODO: Global initialized variable should be removed 124 $TranslationTree = GetTranslationTree(); 125 126 // Initialize application modules 127 $this->ModuleManager->RegisterModule(new ModuleError($System)); 128 $this->ModuleManager->Modules['Error']->ShowError = $Config['Web']['ShowPHPError']; 129 $this->ModuleManager->RegisterModule(new ModuleLog($System)); 130 $this->ModuleManager->RegisterModule(new ModuleUser($System)); 131 $this->ModuleManager->RegisterModule(new ModuleAoWoW($System)); 132 $this->ModuleManager->RegisterModule(new ModuleReferrer($System)); 133 $this->ModuleManager->Modules['Referrer']->Excluded[] = $System->Config['Web']['Host']; 134 $this->ModuleManager->RegisterModule(new ModuleTeam($System)); 135 $this->ModuleManager->RegisterModule(new ModuleDictionary($System)); 136 $this->ModuleManager->RegisterModule(new ModuleTranslation($System)); 137 $this->ModuleManager->RegisterModule(new ModuleImport($System)); 138 $this->ModuleManager->RegisterModule(new ModuleExport($System)); 139 $this->ModuleManager->RegisterModule(new ModuleServer($System)); 140 $this->ModuleManager->RegisterModule(new ModuleClientVersion($System)); 141 $this->ModuleManager->RegisterModule(new ModuleShoutBox($System)); 142 $this->ModuleManager->RegisterModule(new ModuleNews($System)); 143 $this->ModuleManager->RegisterModule(new ModuleWiki($System)); 144 $this->ModuleManager->RegisterModule(new ModuleSearch($System)); 145 $this->ModuleManager->RegisterModule(new ModuleFrontPage($System)); 146 $this->ModuleManager->StartAll(); 147 $User = &$this->User; // Back compatibility, will be removed 148 149 $this->BaseView = new BaseView($this); 150 if($this->DoNotShowPage == false) 151 { 152 $this->PathItems = ProcessURL(); 153 $this->ShowPage(); 154 } 89 155 } 90 156 … … 157 223 { 158 224 $Page = new $ClassName($this); 159 $Page->GetOutput(); 225 $Output = $Page->GetOutput(); 226 if($Page->RawPage == false) $Output = $this->BaseView->ShowPage($Output); 227 echo($Output); 160 228 } else echo($this->PageNotFound()); 161 229 } 162 230 } 231 232 class BaseView extends View 233 { 234 function ShowTopBar() 235 { 236 $Output = '<div class="Menu">'; 237 if(!$this->System->User->Licence(LICENCE_USER)) 238 $Output .= '<div class="advert">'.$this->System->Config['Web']['Advertisement'].'</div>'; 239 $Output .= '<span class="MenuItem"></span>'; 240 if($this->System->User->Licence(LICENCE_USER)) 241 { 242 //$DbResult = $System->Database->query('SELECT `Id`, `Name` FROM `Team` WHERE `Id`='.$this->System->User->Team); 243 //$Team = $DbResult->fetch_assoc(); 244 //$Output .= ''<span class="MenuItem">Moje překlady: <a href="">Dokončené</a> <a href="">Rozpracované</a> <a href="">Exporty</a> Tým: <a href="">'.$Team['name'].'</a></span>'; 245 $Output .= '<span class="MenuItem2">'.$this->System->User->Name.' <a href="'.$this->System->Link('/?action=logout').'">Odhlášení</a>'. 246 ' <a href="'.$this->System->Link('/user.php?user='.$this->System->User->Id).'">Moje stránka</a>'. 247 ' <a href="'.$this->System->Link('/Options.php').'">Nastavení</a>'. 248 ' <a title="Vámi přeložené texty" href="'.$this->System->Link('/TranslationList.php?user='. 249 $this->System->User->Id.'&group=0&state=2&text=&entry=').'">Přeložené</a>'. 250 ' <a title="Vaše rozpracované text" href="'.$this->System->Link('/TranslationList.php?user='. 251 $this->System->User->Id.'&group=0&state=3&text=&entry=').'">Rozpracované</a>'. 252 ' <a title="Nikým nepřeložené texty" href="'.$this->System->Link('/TranslationList.php?user=0&group=0&state=1&text=&entry=').'">Nepřeložené</a>'. 253 '</span>'; 254 } else 255 { 256 $Output .= '<span class="MenuItem2"><form action="'.$this->System->Link('/?action=login').'" method="post"> '. 257 'Jméno: <input type="text" name="LoginUser" size="8 " /> '. 258 'Heslo: <td><input type="password" name="LoginPass" size="8" /> '. 259 '<input type="submit" value="Přihlásit" /></form> '. 260 '<a href="'.$this->System->Link('/registrace.php').'">Registrace</a></span>'; 261 } 262 $Output .= '</div>'; 263 return($Output); 264 } 265 266 function ShowLoginBox() 267 { 268 $Output = ''; 269 if($this->System->User->Licence(LICENCE_USER)) 270 { 271 // $Output .= 'Jste přihlášen jako: <b>'.$tUser->Id.'</b> <a href="index.php?Logout">Odhlásit</a>'; 272 } else 273 { 274 $Output .= '<strong>Přihlášení:</strong> 275 <form action="" method="post"> 276 <table> 277 <tr> 278 <td><input type="text" name="LoginUser" size="13" /></td> 279 </tr> 280 <tr> 281 <td><input type="password" name="LoginPass" size="13" /></td> 282 </tr> 283 <tr> 284 <th><input type="submit" value="Přihlásit" /></th> 285 </tr> 286 </table> 287 </form>'; 288 } 289 return($Output); 290 } 291 292 function ShowSearchBox() 293 { 294 $Output = '<strong>Hledání:</strong>'. 295 '<form action="'.$this->System->Link('/search/').'" method="get"><div>'. 296 '<table>'. 297 '<tr>'. 298 '<td><input type="text" name="text" size="13" /></td>'. 299 '</tr>'. 300 '<tr>'. 301 '<th><input type="submit" value="Hledat" /></th>'. 302 '</tr>'. 303 '</table></div>'. 304 '</form>'; 305 return($Output); 306 } 307 308 function ShowMainMenu() 309 { 310 $Output = '<strong>Nabídka:</strong>'. 311 '<div class="verticalmenu"><ul>'; 312 foreach($this->System->Menu as $MenuItem) 313 if($this->System->User->Licence($MenuItem['Permission'])) 314 { 315 if(isset($MenuItem['Click'])) $OnClick = ' onclick="'.$MenuItem['Click'].'"'; 316 else $OnClick = ''; 317 if($MenuItem['Icon'] != '') $Icon = '<img src="'.$this->System->Link('/images/menu/'.$MenuItem['Icon']).'"/>'; 318 else $Icon = ''; 319 $Output .= '<li>'.$Icon.'<a class="verticalmenua" title="'.$MenuItem['Hint'].'" href="'. 320 $MenuItem['Link'].'"'.$OnClick.'>'.$MenuItem['Title'].'</a></li>'; 321 } 322 $Output .= '</ul></div>'; 323 return($Output); 324 } 325 326 function ShowTranslatedMenu() 327 { 328 global $TranslationTree; 329 330 $Output = '<strong>Překladové skupiny:</strong><br /><div id="TranslationMenu">'; 331 $DbResult = $this->System->Database->select('Group', '`Id`, `Name`', '1 ORDER BY `Name`'); 332 while($Group = $DbResult->fetch_assoc()) 333 { 334 $Output .= '<div id="menuitem-group'.$Group['Id'].'" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">'. 335 '<a href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&action=filter').'">'.$Group['Name'].'</a></div>'. 336 '<div id="group'.$Group['Id'].'" class="hidden-menu-item" onmouseover="show(\'group'.$Group['Id'].'\')" onmouseout="hide(\'group'.$Group['Id'].'\')">'; 337 $Output .= ' <a title="Zde můžete začít překládat" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=1&user=0&entry=&text=').'">Nepřeložené</a><br />'. 338 ' <a title="Přeložené texty, můžete zde hlasovat, nebo opravovat překlady" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=2&user=0&entry=&text=').'">Přeložené</a><br />'; 339 if($this->System->User->Licence(LICENCE_USER)) 340 { 341 $Output .= ' <a title="Nedokončené překlady" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=3').'">Rozepsané</a><br /> 342 <a title="Všechny překlady, které jste přeložil" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&state=1&user='.$this->System->User->Id).'&entry=&text=">Vlastní</a><br />'; 343 } 344 $Output .= ' <a title="Sestavit speciální filtr" href="'.$this->System->Link('/TranslationList.php?group='.$Group['Id'].'&action=filter').'">Filtr</a><br />'; 345 $Output .= '</div>'; 346 } 347 $Output .= '</div>'; 348 return($Output); 349 } 350 351 function ShowHeader() 352 { 353 $Output = '<?xml version="1.0" encoding="'.$this->System->Config['Web']['Charset'].'"?>'. 354 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'. 355 '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cz">'. 356 '<head>'. 357 '<meta http-equiv="content-type" content="application/xhtml+xml; charset='.$this->System->Config['Web']['Charset'].'" />'. 358 '<meta name="keywords" content="wow, quest, questy, questů, preklad, mangos, překlad, překládání, přeložený, přeložení, čeština, world of warcraft, open source, free, addon" />'. 359 '<meta name="description" content="'.$this->System->Config['Web']['Title'].'" />'. 360 '<meta name="robots" content="all" />'. 361 '<link rel="stylesheet" href="'.$this->System->Link('/style/style.css').'" type="text/css" media="all" />'. 362 '<script type="text/javascript" src="'.$this->System->Link('/style/global.js').'"></script>'. 363 '<link rel="shortcut icon" href="'.$this->System->Link('/images/favicon.ico').'" />'; 364 foreach($this->System->RSSChannels as $Channel) 365 { 366 $Output .= ' <link rel="alternate" title="'.$Channel['Title'].'" href="'. 367 $this->System->Link('/rss.php?channel='.$Channel['Channel']).'" type="application/rss+xml" />'; 368 } 369 $Output .= '<title>'.$this->System->Config['Web']['Title'].'</title>'. 370 '</head><body>'; 371 372 $Output .= $this->ShowTopBar(); 373 $Output .= '<table class="page"><tr><td class="menu">'; 374 $Output .= $this->ShowMainMenu(); 375 $Output .= $this->System->ModuleManager->Modules['User']->ShowOnlineList(); 376 $Output .= '<br />'; 377 $Output .= $this->ShowSearchBox(); 378 $Output .= '</td><td id="border-left"></td><td class="content">'; 379 return($Output); 380 } 381 382 function ShowFooter() 383 { 384 global $ScriptStartTime, $Revision, $ReleaseTime; 385 386 $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2); 387 388 $Output = '</td>'. 389 '<td class="menu2">'; 390 $Output .= $this->ShowTranslatedMenu(); 391 $Output .= '</td>'. 392 '</tr><tr>'. 393 '<td colspan="4" class="page-bottom">Verze: '.$Revision.' ('.HumanDate($ReleaseTime).')'. 394 ' <a href="http://svn.zdechov.net/trac/wowpreklad/browser/trunk">Zdrojové soubory</a> '. 395 '<a href="http://svn.zdechov.net/trac/wowpreklad/log/trunk?verbose=on">Novinky</a> '. 396 $this->System->Config['Web']['WebCounter']; 397 398 $Output .= '</td></tr>'; 399 if($this->System->Config['Web']['ShowRuntimeInfo'] == true) 400 $Output .= '<tr><td colspan="3" style="text-align: center;">Doba generování: '. 401 $ScriptGenerateDuration.' s / '.ini_get('max_execution_time').' s Použitá paměť: '. 402 HumanSize(memory_get_peak_usage(FALSE)).' / '.ini_get('memory_limit').'B <a href="http://validator.w3.org/check?uri='. 403 htmlentities('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'].'?'.$_SERVER['QUERY_STRING']).'">HTML validator</a></td></tr>'; 404 $Output .= '</table>'. 405 '</body>'. 406 '</html>'; 407 $this->System->User->Store(); 408 return($Output); 409 } 410 411 function ShowPage($Content) 412 { 413 $Output = $this->ShowHeader().$Content.$this->ShowFooter(); 414 //if($this->System->Config['Web']['FormatOutput']) $Output = $this->FormatOutput($Output); 415 return($Output); 416 } 417 418 function FormatOutput($s) 419 { 420 $out = ''; 421 $nn = 0; 422 $n = 0; 423 while($s != '') 424 { 425 $start = strpos($s, '<'); 426 $end = strpos($s, '>'); 427 if($start != 0) 428 { 429 $end = $start - 1; 430 $start = 0; 431 } 432 $line = trim(substr($s, $start, $end + 1)); 433 if(strlen($line) > 0) 434 if($line[0] == '<') 435 { 436 if($s[$start + 1] == '/') 437 { 438 $n = $n - 2; 439 $nn = $n; 440 } else 441 { 442 if(strpos($line, ' ')) $cmd = substr($line, 1, strpos($line, ' ') - 1); 443 else $cmd = substr($line, 1, strlen($line) - 2); 444 //echo('['.$cmd.']'); 445 if(strpos($s, '</'.$cmd.'>')) $n = $n + 2; 446 } 447 }// else $line = '['.$line.']'; 448 //if($line != '') echo(htmlspecialchars(str_repeat(' ',$nn).$line."\n")); 449 if($line != '') $out .= (str_repeat(' ', $nn).$line."\n"); 450 $s = substr($s, $end + 1, strlen($s)); 451 $nn = $n; 452 } 453 return($out); 454 } 455 } -
trunk/index.php
r552 r577 3 3 include_once('includes/global.php'); 4 4 5 $System ->PathItems = ProcessURL();6 $System-> ShowPage();5 $System = new System(); 6 $System->Run(); -
trunk/info.php
r553 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include('includes/global.php'); 4 5 … … 32 33 '</ul><br />'. 33 34 '<br />'; 34 35 35 36 ShowPage($Output); -
trunk/promotion.php
r553 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include('includes/global.php'); 4 5 -
trunk/rss.php
r553 r577 1 1 <?php 2 2 3 $InitSystem = true; 3 4 include_once('includes/global.php'); 4 5 -
trunk/statistic.php
r553 r577 1 1 <?php 2 2 3 include('includes/global.php'); 3 $InitSystem = true; 4 include_once('includes/global.php'); 4 5 5 6 $LanguageList = GetLanguageList();
Note:
See TracChangeset
for help on using the changeset viewer.