Changeset 734
- Timestamp:
- Jan 8, 2014, 4:43:28 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ExportOutput.php
r733 r734 228 228 global $System; 229 229 $Output = ''; 230 $DbResult = $System->Database->query('SELECT Progress FROM `ExportTask` WHERE `Export`='.$Export->Id); 231 $Task = $DbResult->fetch_assoc(); 232 233 // $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 234 // 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&Auto&ExportId='.$Export->Id).'\'", 5000)'. 235 // '</script>'; '.ProgressBar(300, $Task['Progress']).' 236 $Output .= '<script src="http://code.jquery.com/jquery-latest.js"></script>'. 230 $DbResult = $System->Database->query('SELECT * FROM `ExportTask`'. 231 ' LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE (`Export`.`OutputType` = 9 OR `Export`.`OutputType` = 10 ) AND `TimeFinish` IS NULL ORDER BY `Progress` DESC');// `Export`='.$Export->Id 232 $Output .= 'Fronta zpracování exportů. Zobrazuje procenta dokončení: <br /><br />'; 233 while($Task = $DbResult->fetch_assoc()) { 234 $Output .= '<script src="http://code.jquery.com/jquery-latest.js"></script>'. 237 235 '<script>'. 238 236 '$(document).ready(function() {'. 239 237 'var refreshId = setInterval(function() {'. 240 '$("#progress ").load("'.$System->Link('/Modules/Export/Progress.php?ExportId='.$Export->Id).'"); '.238 '$("#progress'.$Task['Export'].'").load("'.$System->Link('/Modules/Export/Progress.php?ExportId='.$Task['Export']).'"); '. 241 239 '}, 1000);'. 242 240 '});'. 243 241 '</script>'; 244 $Output .= ' <strong>Dokončeno procent: <div id="progress">'.ProgressBar(300, $Task['Progress']).'</div></strong>'; 245 // $(\'#load_progress\').load(\''.'?Action=View&Tab=7&Auto&ExportId='.$Export->Id.'\'); 246 // Modules/Export/Progress.php?ExportId=37 247 if ($Task['Progress'] == 0) $Output .= '<br/><br/><strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 248 242 $Export = '<a href="'.$System->Link('/export/?Action=View&ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>'; 243 if ($_GET['ExportId'] == $Task['Export']) 244 $Export = ''.$Export.' (aktuální)'; 245 246 $Output .= ' <strong>Export '.$Export.': <div id="progress'.$Task['Export'].'">'.ProgressBar(300, $Task['Progress']).'</div></strong><br />'; 247 // if ($Task['Progress'] == 0) $Output .= '<br/><br/><strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 248 249 } 249 250 return ($Output); 250 251 } -
trunk/Modules/Export/ProcessTask.php
r732 r734 21 21 $System->Database->query('UPDATE `ExportTask` SET `Progress`='.$per.' WHERE `Export`='.$Export->Id); 22 22 } 23 function SetOnline() { 24 global $System; 25 $File = new FileStream(); 26 $File->CreateFile(dirname(__FILE__).'/../../'.$System->Config['Web']['TempFolder'].'ProcessTask'); 27 $File->WriteLine(1); 28 } 23 29 24 30 25 function DeleteOldFiles($deldir) … … 102 97 while(1) 103 98 { 104 //setonline105 SetOnline();106 99 // DBC files 107 100 $DbResult = $System->Database->query('SELECT `ExportTask`.`Export`, `Export`.`Id` AS `ExportId` FROM `ExportTask`'. -
trunk/admin/index.php
r708 r734 14 14 $Output = '<h3>Volby pro správu</h3>'; 15 15 16 $fileprocesstask = dirname(__FILE__).'/../'.$System->Config['Web']['TempFolder'].'ProcessTask';17 if (file_exists($fileprocesstask)) {18 if (filemtime($fileprocesstask) > (time()-1-$System->Config['ExportTaskProcessPeriod'])) {19 $Output .= 'ProcessTask je online<br />';20 } else $Output .= '<b>ProcessTask je offline f</b><br />';21 } else $Output .= '<b>ProcessTask je offline</b><br />';22 23 16 $Output .= '<br />'. 24 17 '<a href="https://'.$Config['Web']['Host'].'/phpmyadmin/">Správa databáze</a><br/>'. -
trunk/includes/Version.php
r733 r734 6 6 // and system will need database update. 7 7 8 $Revision = 73 3; // Subversion revision8 $Revision = 734; // Subversion revision 9 9 $DatabaseRevision = 732; // Database structure revision 10 10 $ReleaseTime = '2014-01-08'; -
trunk/includes/system.php
r726 r734 406 406 $Output .= $this->ShowSearchBox(); 407 407 408 if($this->System->User->Licence(LICENCE_ADMIN)) {409 $fileprocesstask = dirname(__FILE__).'/../'.$this->Config['Web']['TempFolder'].'ProcessTask';410 if (file_exists($fileprocesstask)) {411 if (filemtime($fileprocesstask) > (time()-1-$this->Config['ExportTaskProcessPeriod'])) {412 $Output .= 'ProcessTask je online<br />';413 } else $Output .= '<b>ProcessTask je offline</b><br />';414 } else $Output .= '<b>ProcessTask je offline</b><br />';415 }416 408 $Output .= '</td><td id="border-left"></td><td class="content">'; 417 409 return($Output);
Note:
See TracChangeset
for help on using the changeset viewer.