Changeset 818 for trunk/Modules/Export/ExportOutput.php
- Timestamp:
- Feb 23, 2015, 12:32:54 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ExportOutput.php
r816 r818 9 9 function CreateZipFromDir(&$Zip, $Path, $ZipPath) 10 10 { 11 //echo($Path.'<br />');12 11 $FileList = scandir($Path); 13 12 foreach($FileList as $FileName) … … 15 14 if(file_exists($Path.$FileName) and ($FileName != '.') and ($FileName != '..')) 16 15 { 17 //echo($Path.$FileName.'<br />');18 16 if(is_dir($Path.$FileName)) CreateZipFromDir($Zip, $Path.$FileName.'/', $ZipPath.$FileName.'/'); 19 17 else $Zip->addFile(file_get_contents($Path.$FileName), $ZipPath.$FileName); … … 226 224 } 227 225 228 function ShowProgress($Export) { 229 global $System; 230 $Output = ''; 231 $Output .= 'Fronta zpracování exportů. Zobrazuje procenta dokončení: <br /><br />'; 232 233 234 $Output .= '<script src="http://code.jquery.com/jquery-latest.js"></script>'. 235 '<script>'. 236 '$(document).ready(function() {'. 237 'var refreshId = setInterval(function() {'. 238 '$("#progress").load("'.$System->Link('/Modules/Export/Progress.php?RedirectId='.$_GET['ExportId']).'"); '. 239 '}, 1000);'. 240 '});'. 241 '</script>'; 242 243 244 $Output .= ' <strong><div id="progress"></div></strong><br />'; 245 246 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '. 247 ' (`Export`.`OutputType` = 9 OR `Export`.`OutputType` = 10 ) AND `TimeFinish` IS NULL AND `TimeStart` < NOW()-10000'); 248 if($DbResult->num_rows > 0) { 249 $System->ModuleManager->Modules['Log']->WriteLog('ProcesTask nepracuje přes 2 hodiny, pravděpodobně nepracuje!', LOG_TYPE_ERROR); 250 251 } 252 return ($Output); 226 function ShowProgress($Export) 227 { 228 global $System; 229 230 $Output = ''; 231 $Output .= 'Fronta zpracování exportů. Zobrazuje procenta dokončení: <br /><br />'; 232 233 $Output .= '<script src="'.$System->Link('/style/jquery.js').'"></script>'. 234 '<script>'. 235 '$(document).ready(function() {'. 236 'var refreshId = setInterval(function() {'. 237 '$("#progress").load("'.$System->Link('/Modules/Export/Progress.php?RedirectId='.$_GET['ExportId']).'"); '. 238 '}, 1000);'. 239 '});'. 240 '</script>'; 241 242 $Output .= ' <strong><div id="progress"></div></strong><br />'; 243 244 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` '. 245 '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))'); 247 if($DbResult->num_rows > 0) 248 { 249 $System->ModuleManager->Modules['Log']->WriteLog('ProcesTask nepracuje přes 2 hodiny, pravděpodobně nepracuje!', LOG_TYPE_ERROR); 250 } 251 return ($Output); 253 252 } 254 253 … … 285 284 { 286 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/>'; 287 288 286 } else { 289 290 287 $Output .= ShowProgress($Export); 291 288 }
Note:
See TracChangeset
for help on using the changeset viewer.