- Timestamp:
- Feb 5, 2016, 11:47:36 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Core.php
r862 r864 332 332 $this->PageHeaders[$Name] = $Callback; 333 333 } 334 335 function HumanDate($Time) 336 { 337 return(date('j.n.Y', $Time)); 338 } 334 339 } -
trunk/Application/Version.php
r862 r864 6 6 // and system will need database update. 7 7 8 $Version = '1.0 -alfa';9 $Revision = 86 2; // Subversion revision8 $Version = '1.0'; 9 $Revision = 864; // Subversion revision 10 10 $DatabaseRevision = 857; // Database structure revision 11 $Release Time = '2016-01-22';11 $ReleaseDate = strtotime('2016-02-05'); -
trunk/Application/View.php
r863 r864 109 109 function ShowFooter() 110 110 { 111 global $ScriptStartTime, $Revision, $Release Time, $Version;111 global $ScriptStartTime, $Revision, $ReleaseDate, $Version; 112 112 113 113 $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2); … … 123 123 $Output .= '</td>'; 124 124 $Output .= '</tr><tr>'. 125 '<td colspan="4" class="page-bottom">'.T('Version').': '.$Version.' '.T('Revision').': '.$Revision.' ('. HumanDate($ReleaseTime).')'.125 '<td colspan="4" class="page-bottom">'.T('Version').': '.$Version.' '.T('Revision').': '.$Revision.' ('.$this->System->HumanDate($ReleaseDate).')'. 126 126 ' <a href="http://svn.zdechov.net/trac/wowpreklad/browser/trunk">'.T('Source code').'</a> '. 127 127 '<a href="http://svn.zdechov.net/trac/wowpreklad/log/trunk?verbose=on">'.T('Changelog').'</a> '. -
trunk/Modules/Export/Export.php
r859 r864 715 715 { 716 716 $this->System->RegisterPage('export', 'PageExport'); 717 $this->System->RegisterPage(array('export', 'progress'), 'PageExportProgress'); 717 718 $this->System->RegisterMenuItem(array( 718 719 'Title' => 'Exporty', … … 723 724 ), 2); 724 725 } 726 727 function GetTaskProgress($TaskId) 728 { 729 $Output = ''; 730 $DbResult = $this->Database->query('SELECT * FROM `ExportTask` '. 731 'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '. 732 '((`Export`.`OutputType` = 9) OR (`Export`.`OutputType` = 10)) AND '. 733 '(`TimeFinish` IS NULL) OR (`Export` ='.$TaskId.') ORDER BY `Progress` DESC'); // `Export`='.$Export->Id 734 while($Task = $DbResult->fetch_assoc()) 735 { 736 $Export = '<a href="'.$this->System->Link('/export/?Action=View&ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>'; 737 if ($TaskId == $Task['Export']) 738 $Export = ''.$Export.' (tento)'; 739 740 // Show progress bar 741 $Output .= ' <strong>Export '.$Export.': <div id="progress'.$Task['Export'].'">'. 742 ProgressBar(300, $Task['Progress']).'</div></strong>'; 743 744 // Show estimated time to complete 745 $PrefixMultiplier = new PrefixMultiplier(); 746 $EstimatedTime = (time() - MysqlDateTimeToTime($Task['TimeStart'])) / $Task['Progress'] * (100 - $Task['Progress']); 747 $Output .= 'Zbývající odhadovaný čas: '.$PrefixMultiplier->Add($EstimatedTime, '', 4, 'Time').'<br/>'; 748 749 if($Task['Progress'] > 99) 750 $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 751 'setTimeout("parent.location.href=\''.$this->System->Link('/export/?Action=View&Tab=7&ExportId='.$TaskId).'\'", 500)'. 752 '</script>'; 753 } 754 return($Output); 755 } 725 756 } 726 -
trunk/Modules/Export/ExportOutput.php
r818 r864 235 235 '$(document).ready(function() {'. 236 236 'var refreshId = setInterval(function() {'. 237 '$("#progress").load("'.$System->Link('/ Modules/Export/Progress.php?RedirectId='.$_GET['ExportId']).'"); '.237 '$("#progress").load("'.$System->Link('/export/progress?i='.$_GET['ExportId']).'"); '. 238 238 '}, 1000);'. 239 239 '});'. 240 240 '</script>'; 241 241 242 $Output .= ' <strong><div id="progress"></div></strong><br />'; 243 242 $Output .= ' <div id="progress">'.$System->ModuleManager->Modules['Export']->GetTaskProgress($_GET['ExportId'] * 1). 243 '</div><br />'; 244 245 // Check if process task is running 244 246 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` '. 245 247 'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` '. 246 'WHERE ((`Export`.`OutputType` = 9) OR (`Export`.`OutputType` = 10)) AND (`TimeFinish` IS NULL) AND (`TimeStart` < (NOW() - 10000))'); 248 'WHERE ((`Export`.`OutputType` = 9) OR (`Export`.`OutputType` = 10)) AND '. 249 '(`TimeFinish` IS NULL) AND (`TimeStart` < (NOW() - 10000))'); 247 250 if($DbResult->num_rows > 0) 248 251 { … … 262 265 263 266 $Output = ''; 264 if(array_key_exists('Regenerate', $_POST)) 265 { 266 $System->Database->query('UPDATE ExportTask SET TimeStart = NOW(), `Progress`=0, TimeFinish = NULL WHERE Export = '.$ExportId); 267 $Output .= ShowMessage('Soubor zařazen znovu ke zpracování do fronty.'); 268 $System->ModuleManager->Modules['Log']->WriteLog('Zadání úlohy pro vygenerování exe souboru', LOG_TYPE_DOWNLOAD); 269 } 270 271 $Output .= '<form action="?Action=View&Tab=7&ExportId='.$ExportId.'" method="post"><input type="submit" name="Regenerate" value="Přegenerovat"/></form><br />'; 267 // Allow to regenerate output if it was previously finished 268 $DbResult = $System->Database->query('SELECT `Id` FROM `ExportTask` WHERE (`Export` = '.$ExportId. 269 ') AND ((`TimeFinish` < `TimeStart`) OR (`TimeFinish` IS NULL))'); 270 if($DbResult->num_rows == 0) 271 { 272 if(array_key_exists('Regenerate', $_POST)) 273 { 274 $System->Database->query('UPDATE `ExportTask` SET `TimeStart` = NOW(), `Progress`=0, `TimeFinish` = NULL WHERE `Export` = '.$ExportId); 275 $Output .= ShowMessage('Soubor zařazen znovu ke zpracování do fronty.'); 276 $System->ModuleManager->Modules['Log']->WriteLog('Zadání úlohy pro vygenerování exe souboru', LOG_TYPE_DOWNLOAD); 277 } else { 278 $Output .= '<form action="?Action=View&Tab=7&ExportId='.$ExportId.'" method="post">'. 279 '<input type="submit" name="Regenerate" value="Přegenerovat"/></form><br />'; 280 } 281 } 282 272 283 $Output .= 'U souhrné instalace češtiny funguje export textů jinak, protože generování je náročné, jsou požadavky zařazovány do fronty a postupně zpracovávány.<br /><br />'; 273 284 274 $DbResult = $System->Database->query('SELECT * FROM ExportTask WHERE Export = '.$ExportId); 285 // Start task for the first time if export task was not yet started 286 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` WHERE `Export` = '.$ExportId); 275 287 if($DbResult->num_rows == 0) 276 288 { … … 283 295 if($ExportTask['TimeFinish'] > $ExportTask['TimeStart']) 284 296 { 285 $Output .= '<strong>Souhrný EXE balík: <a href="'.$System->Link('/'.$Export->TempDirRelative.'Instalace_CzechWoW_'.$Export->ClientVersion['Version'].'.exe').'">Instalace_CzechWoW_'.$Export->ClientVersion['Version'].'.exe</a></strong><br/>'; 297 $FileName = 'Instalace_CzechWoW_'.$Export->ClientVersion['Version'].'.exe'; 298 $Output .= '<strong>Souhrný EXE balík: <a href="'.$System->Link('/'.$Export->TempDirRelative.$FileName).'">'.$FileName.'</a></strong><br/>'; 286 299 } else { 287 300 $Output .= ShowProgress($Export); -
trunk/Modules/Export/Page.php
r862 r864 828 828 } 829 829 } 830 831 class PageExportProgress extends Page 832 { 833 function __construct($System) 834 { 835 parent::__construct($System); 836 $this->RawPage = true; 837 } 838 839 function Show() 840 { 841 if(array_key_exists('i', $_GET)) 842 $Output = $this->System->ModuleManager->Modules['Export']->GetTaskProgress($_GET['i'] * 1); 843 else $Output = 'Missing task id'; 844 return($Output); 845 } 846 } -
trunk/Modules/Info/Info.php
r844 r864 93 93 'Addon jako takový je běžný doplněk do hry a je možné jej bez problémů používat i na oficiálních serverech.<br/>'. 94 94 '<iframe width="420" height="315" src="https://www.youtube.com/embed/6EhBFv59syk" frameborder="0" allowfullscreen></iframe><br/>'. 95 '<img src=" images/promotion.bmp" width="800" alt="addon-obr">';95 '<img src="'.$this->System->Link('/images/promotion.bmp').'" width="800" alt="addon-obr">'; 96 96 return($Output); 97 97 }
Note:
See TracChangeset
for help on using the changeset viewer.