Changeset 864 for trunk/Modules/Export/Export.php
- Timestamp:
- Feb 5, 2016, 11:47:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.