Changeset 818 for trunk/Modules
- Timestamp:
- Feb 23, 2015, 12:32:54 AM (10 years ago)
- Location:
- trunk/Modules
- Files:
-
- 4 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 } -
trunk/Modules/Export/Progress.php
r816 r818 3 3 include_once(dirname(__FILE__).'/../../includes/global.php'); 4 4 5 6 7 5 $System = new System(); 6 $System->DoNotShowPage = true; 7 $System->Run(); 8 8 9 $Output = ''; 10 if(!array_key_exists('RedirectId', $_GET)) exit; 9 11 10 $Output = ''; 11 $DbResult = $System->Database->query('SELECT * FROM `ExportTask`'. 12 ' LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE (`Export`.`OutputType` = 9 OR `Export`.`OutputType` = 10 ) AND `TimeFinish` IS NULL OR `Export` ='.$_GET['RedirectId'].' ORDER BY `Progress` DESC');// `Export`='.$Export->Id 13 while($Task = $DbResult->fetch_assoc()) { 14 $Export = '<a href="'.$System->Link('/export/?Action=View&ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>'; 15 if ($_GET['RedirectId'] == $Task['Export']) 16 $Export = ''.$Export.' (tento)'; 17 $Output .= ' <strong>Export '.$Export.': <div id="progress'.$Task['Export'].'">'.ProgressBar(300, $Task['Progress']).'</div></strong><br />'; 18 if ( $Task['Progress'] > 99 ) echo '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 12 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` '. 13 'LEFT JOIN `Export` ON `Export`.`Id` = `ExportTask`.`Export` WHERE '. 14 '((`Export`.`OutputType` = 9) OR (`Export`.`OutputType` = 10)) AND '. 15 '(`TimeFinish` IS NULL) OR (`Export` ='.($_GET['RedirectId'] * 1).') ORDER BY `Progress` DESC'); // `Export`='.$Export->Id 16 while($Task = $DbResult->fetch_assoc()) 17 { 18 $Export = '<a href="'.$System->Link('/export/?Action=View&ExportId='.$Task['Export']).'">'.$Task['Export'].'</a>'; 19 if ($_GET['RedirectId'] == $Task['Export']) 20 $Export = ''.$Export.' (tento)'; 21 $Output .= ' <strong>Export '.$Export.': <div id="progress'.$Task['Export'].'">'.ProgressBar(300, $Task['Progress']).'</div></strong><br />'; 22 if($Task['Progress'] > 99) 23 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 19 24 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&ExportId='.$_GET['RedirectId']).'\'", 500)'. 20 '</script>' ;21 25 '</script>'); 26 } 22 27 23 echo $Output; 24 //echo ''.ProgressBar(300, $Task['Progress']).''; 25 28 echo($Output); 29 //echo ''.ProgressBar(300, $Task['Progress']).''; -
trunk/Modules/Log/Log.php
r816 r818 223 223 $Output .= $this->ShowList(); 224 224 return($Output); 225 } else $Output .= ShowMessage(T('Access denied'), MESSAGE_CRITICAL);225 } else $Output = ShowMessage(T('Access denied'), MESSAGE_CRITICAL); 226 226 } 227 227 } -
trunk/Modules/Translation/Form.php
r816 r818 205 205 //todo javascript 206 206 207 $Output .= '<script src=" http://code.jquery.com/jquery-latest.js"></script>'.208 207 $Output .= '<script src="'.$System->Link('/style/jquery.js').'"></script>'. 208 '<script>'; 209 209 $Output .= '$(document).ready(function() {'; 210 210 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem) … … 212 212 213 213 $Output .= '});'. 214 214 '</script>'; 215 215 216 216 foreach($TranslationTree[$GroupId]['Items'] as $Index => $TextItem)
Note:
See TracChangeset
for help on using the changeset viewer.