Changeset 727
- Timestamp:
- Jan 7, 2014, 9:54:21 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/ClientVersion/ClientVersion.php
r637 r727 30 30 { 31 31 function Show() 32 { 33 if(array_key_exists('action', $_GET)) 34 { 35 if($_GET['action'] == 'item') $Output = $this->ShowItem(); 36 else $Output = $this->ShowList(); 37 } else $Output = $this->ShowList(); 38 return($Output); 39 } 40 41 function ShowItem() 42 { 43 $YesNo = array('Ne', 'Ano'); 44 $DbResult = $this->System->Database->query('SELECT * FROM ClientVersion WHERE Id='.$_GET['id']); 45 if($DbResult->num_rows > 0) 46 { 47 $Version = $DbResult->fetch_assoc(); 48 49 $Output = '<h3>'.T('Client version').'</h3>'; 50 $Output .= '<table class="BaseTable">'. 51 '<tr><td>'.T('Version').'</td><td>'.$Version['Version'].'</td></tr>'. 52 '<tr><td>'.T('More information').'</td><td><a href="http://www.wowwiki.com/Patch_'.$Version['Version'].'">wowwiki.com'. 53 '</a></td></tr>'. 54 '<tr><td>'.T('Build number').'</td><td>'.$Version['BuildNumber'].'</td></tr>'. 55 '<tr><td>'.T('Release date').'</td><td>'.HumanDate($Version['ReleaseDate']).'</td></tr>'. 56 '<tr><td>'.T('Title').'</td><td>'.$Version['Title'].'</td></tr>'. 57 '<tr><td>'.T('Imported').'</td><td>'.$YesNo[$Version['Imported']].'</td></tr>'. 58 '</table>'; 59 $Output .= '<div><a href="?">'.T('All versions list').'</a></div>'; 60 if($Version['Imported']) 61 $Output .= '<div><a href="'.$this->System->Link('/progress/?Version='.$Version['Version']).'">'.T('Progress').'</a></div>'; 62 } else $Output = ShowMessage(T('Item not found'), MESSAGE_CRITICAL); 63 return($Output); 64 } 65 66 function ShowList() 32 67 { 33 68 $this->Title = T('Game version'); … … 55 90 while($Version = $DbResult->fetch_assoc()) 56 91 { 57 $Output .= '<tr><td><a href=" http://www.wowwiki.com/Patch_'.$Version['Version'].'">'.92 $Output .= '<tr><td><a href="?action=item&id='.$Version['Id'].'">'. 58 93 $Version['Version'].'</a></td><td>'.$Version['BuildNumber'].'</td><td>'. 59 94 HumanDate($Version['ReleaseDate']).'</td><td>'.$Version['Title'].'</td>'. -
trunk/Modules/Export/Export.php
r721 r727 273 273 return($Buffer); 274 274 } 275 276 277 275 278 276 function HaveVarible($String1, $String2, $StartChar = '$') -
trunk/Modules/Export/Page.php
r716 r727 55 55 $Order['Output']; 56 56 57 $DbResult = $this->System->Database->query('SELECT `User`.`Name` AS `UserName`, `Export`.`Id`, `Export`.`TimeCreate`, `Export`.`Title`, `Export`.`User`, `Export`.`UsedCount`, (SELECT Version FROM `ClientVersion` WHERE `ClientVersion`.`Id`=`Export`.`ClientVersion`) AS `ClientVersion`,(SELECT Name FROM `ExportOutputType` WHERE `ExportOutputType`.`Id`=`Export`.`OutputType`) AS `OutputType`, (SELECT COUNT(*) FROM `ExportGroup` WHERE `ExportGroup`.`Export`=`Export`.`Id`) AS `GroupCount`, (SELECT COUNT(*) FROM `ExportUser` WHERE `ExportUser`.`Export`=`Export`.`Id`) AS `UserCount` FROM `Export` LEFT JOIN `User` ON `User`.`ID`=`Export`.`User` '.$Filter.$Order['SQL'].$PageList['SQLLimit']); 57 $DbResult = $this->System->Database->query('SELECT `User`.`Name` AS `UserName`, `Export`.`Id`, `Export`.`TimeCreate`, `Export`.`Title`, `Export`.`User`, `Export`.`UsedCount`, '. 58 '(SELECT Version FROM `ClientVersion` WHERE `ClientVersion`.`Id`=`Export`.`ClientVersion`) AS `ClientVersion`, '. 59 '(SELECT Id FROM `ClientVersion` WHERE `ClientVersion`.`Id`=`Export`.`ClientVersion`) AS `ClientVersionId`, '. 60 '(SELECT Name FROM `ExportOutputType` WHERE `ExportOutputType`.`Id`=`Export`.`OutputType`) AS `OutputType`, '. 61 '(SELECT COUNT(*) FROM `ExportGroup` WHERE `ExportGroup`.`Export`=`Export`.`Id`) AS `GroupCount`, '. 62 '(SELECT COUNT(*) FROM `ExportUser` WHERE `ExportUser`.`Export`=`Export`.`Id`) AS `UserCount` FROM `Export` '. 63 'LEFT JOIN `User` ON `User`.`ID`=`Export`.`User` '.$Filter.$Order['SQL'].$PageList['SQLLimit']); 58 64 while($Export = $DbResult->fetch_assoc()) 59 65 { … … 66 72 '<td>'.$Export['Title'].'</td>'. 67 73 '<td>'.$Export['OutputType'].'</td>'. 68 '<td> '.$Export['ClientVersion'].'</td>'.74 '<td><a href="'.$this->System->Link('/client-version/?action=item&id='.$Export['ClientVersionId']).'">'.$Export['ClientVersion'].'</a></td>'. 69 75 '<td>'.$Export['UsedCount'].'</td>'. 70 76 '<td>'.$Action.'</td></tr>'; -
trunk/Modules/Import/Import.php
r723 r727 457 457 unset($Line); 458 458 459 $value_buff = ''; 460 $Value = ''; 459 461 foreach($LineParts as $LinePart) 460 462 { … … 523 525 return($Output); 524 526 } 527 525 528 function UpdateLastVersion() { 526 529 $DbResult = $this->System->Database->query('SELECT * FROM `Group` WHERE `Id`='.$this->Group['Id']); -
trunk/Modules/Import/cmd.php
r718 r727 7 7 include_once('../../includes/global.php'); 8 8 include_once('../../includes/dbc.php'); 9 include_once(' import.php');9 include_once('Import.php'); 10 10 11 11 $System = new System(); -
trunk/Modules/Translation/Form.php
r710 r727 58 58 59 59 if($Action == 'delete') $Output = $this->Delete(); 60 else $Output = $this->ShowForm();60 else $Output = $this->ShowForm(); 61 61 return($Output); 62 62 } … … 290 290 function Delete() 291 291 { 292 global $TranslationTree; 293 292 294 if($this->System->User->Licence(LICENCE_MODERATOR)) 293 295 { 296 $GroupId = LoadGroupIdParameter(); 297 $this->GroupId = $GroupId; 298 $Table = $TranslationTree[$GroupId]['TablePrefix']; 294 299 $TextID = $_GET['ID']; 295 300 $this->Database->query('DELETE FROM `'.$Table.'` WHERE `ID` = '.$TextID.' AND `Language` <> '.$this->System->Config['OriginalLanguage']); 296 301 $Output = ShowMessage('Překlad byl smazán.'); 297 $this->System->ModuleManager->Modules['Log']->WriteLog('Překlad byl smazán! <a href="'.$this->System->Link('/form.php?group='.$ GroupID.'&ID='.$TextID).'">'.$TextID.'</a>', LOG_TYPE_MODERATOR);302 $this->System->ModuleManager->Modules['Log']->WriteLog('Překlad byl smazán! <a href="'.$this->System->Link('/form.php?group='.$this->GroupId.'&ID='.$TextID).'">'.$TextID.'</a>', LOG_TYPE_MODERATOR); 298 303 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 299 304 return($Output); -
trunk/Modules/Translation/Save.php
r724 r727 5 5 function Show() 6 6 { 7 global $TranslationTree ;7 global $TranslationTree, $Message, $MessageType; 8 8 9 9 $Output = ''; -
trunk/Modules/Translation/TranslationList.php
r661 r727 311 311 if($Group['LuaFileName'] != '') $Output .= $Group['LuaFileName'].'.lua '; 312 312 $Output .= '</td><td><a title="Změny po posledním importu u vybrané překladové skupiny" href="log.php?group='. 313 $Group['Id'].'&type=11">'.HumanDate($Group['LastImport']).'</a></td><td> '.GetVersionWOW($Group['LastVersion']).'</td>';313 $Group['Id'].'&type=11">'.HumanDate($Group['LastImport']).'</a></td><td><a href="'.$this->System->Link('/client-version/?action=item&id='.GetVersionWOWId($Group['LastVersion'])).'">'.GetVersionWOW($Group['LastVersion']).'</a></td>'; 314 314 if($this->System->User->Licence(LICENCE_ADMIN)) 315 315 $Output .= '<td><a href="?action=groupdelete&id='.$Group['Id'].'">Smazat</a></td>'; -
trunk/admin/UpdateTrace.php
r725 r727 2669 2669 function UpdateTo646($Manager) 2670 2670 { 2671 $Manager->Execute('ALTER TABLE 2671 $Manager->Execute('ALTER TABLE `Export` ADD `AllUsers` TINYINT( 1 ) NOT NULL ;'); 2672 2672 2673 2673 } … … 2675 2675 function UpdateTo666($Manager) 2676 2676 { 2677 $Manager->Execute('INSERT INTO `ExportOutputType` (`Id` ,`Name`)VALUES (\'10\' , \'Instalace - Instala�n�soubor pro klienta\');');2678 $Manager->Execute('INSERT INTO 2677 $Manager->Execute('INSERT INTO `ExportOutputType` (`Id` ,`Name`) VALUES (\'10\' , \'Instalace - Instalační soubor pro klienta\');'); 2678 $Manager->Execute('INSERT INTO `ExportVersion` (`Id` ,`ExportType` ,`ClientVersion`)VALUES (NULL , \'10\', \'84\');'); 2679 2679 } 2680 2680 2681 2681 function UpdateTo678($Manager) 2682 2682 { 2683 $Manager->Execute('INSERT INTO 2683 $Manager->Execute('INSERT INTO `ExportVersion` (`Id` ,`ExportType` ,`ClientVersion`)VALUES (NULL , \'10\', \'11\');'); 2684 2684 } 2685 2685 -
trunk/includes/global.php
r712 r727 373 373 } 374 374 375 // TODO: Client version build number should not be used in internal references 375 376 function GetVersionWOW($BuildNumber) 376 377 { … … 385 386 } 386 387 return($VersionsWOW[$BuildNumber]); 388 } 389 390 // TODO: Client version build number should not be used in internal references 391 function GetVersionWOWId($BuildNumber) 392 { 393 global $System, $VersionsWOWId; 394 395 if(isset($VersionsWOWId[$BuildNumber]) == false) 396 { 397 $sql = 'SELECT `Id` FROM `ClientVersion` WHERE `BuildNumber` = "'.$BuildNumber.'"'; 398 $DbResult = $System->Database->query($sql); 399 $Version = $DbResult->fetch_assoc(); 400 $VersionsWOWId[$BuildNumber] = $Version['Id']; 401 } 402 return($VersionsWOWId[$BuildNumber]); 387 403 } 388 404
Note:
See TracChangeset
for help on using the changeset viewer.