Changeset 670 for trunk/Modules/Export/ExportOutput.php
- Timestamp:
- Dec 24, 2013, 5:48:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ExportOutput.php
r668 r670 204 204 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` WHERE `Export` = '.$ExportId); 205 205 $ExportTask = $DbResult->fetch_assoc(); 206 $Export = new Export($System); 207 $Export->Id = $ExportId; 208 $Export->Init(); 206 209 if($ExportTask['TimeFinish'] > $ExportTask['TimeStart']) 207 210 { 208 $Export = new Export($System);209 $Export->Id = $ExportId;210 $Export->Init();211 211 $Output .= '<strong>Souhrný balík: <a href="'.$System->Link('/'.$Export->TempDirRelative.'CzWoW_DBC.zip').'">CzWoW_DBC.zip</a></strong><br/>'; 212 212 $DbResult = $System->Database->query('SELECT `Group`.* FROM `ExportGroup` JOIN `Group` ON `Group`.`Id` = `ExportGroup`.`Group` WHERE `ExportGroup`.`Export`='.$Export->Id.' AND `Group`.`DBCFileName` != ""'); … … 216 216 $Output .= '<a href="'.$System->Link('/'.$Export->TempDirRelative.'dbc/'.$Group['DBCFileName'].'.dbc').'">'.$Group['DBCFileName'].'.dbc</a><br/>'; 217 217 } 218 } else $Output .= '<strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 218 } else { 219 220 $Line = 0; 221 if (file_exists (dirname(__FILE__).'/../../'.$Export->TempDirRelative.'progress')) { 222 $File = new FileStream(); 223 $File->OpenFile(dirname(__FILE__).'/../../'.$Export->TempDirRelative.'progress'); 224 $Line = $File->ReadLine(); 225 } 226 $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 227 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&ExportId='.$Export->Id).'\'", 4000)'. 228 '</script>'; 229 $Output .= ' <strong>Zbývá procent: '.ProgressBar(300, $Line).'</strong>'; 230 $Output .= '<br/><br/><strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 231 } 219 232 return($Output); 220 233 } … … 242 255 $DbResult = $System->Database->query('SELECT * FROM `ExportTask` WHERE `Export` = '.$ExportId); 243 256 $ExportTask = $DbResult->fetch_assoc(); 257 $Export = new Export($System); 258 $Export->Id = $ExportId; 259 $Export->Init(); 260 $Export->LoadFilters(); 244 261 if($ExportTask['TimeFinish'] > $ExportTask['TimeStart']) 245 262 { 246 $Export = new Export($System); 247 $Export->Id = $ExportId; 248 $Export->Init(); 249 $Export->LoadFilters(); 263 // unlink($Export->TempDirRelative.'progress'); 250 264 $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/>'; 251 265 252 } else $Output .= '<strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 266 } else { 267 268 $Line = 0; 269 if (file_exists (dirname(__FILE__).'/../../'.$Export->TempDirRelative.'progress')) { 270 $File = new FileStream(); 271 $File->OpenFile(dirname(__FILE__).'/../../'.$Export->TempDirRelative.'progress'); 272 $Line = $File->ReadLine(); 273 } 274 $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 275 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&ExportId='.$Export->Id).'\'", 4000)'. 276 '</script>'; 277 $Output .= ' <strong>Zbývá procent: '.ProgressBar(300, $Line).'</strong>'; 278 $Output .= '<br/><br/><strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 279 } 253 280 return($Output); 254 281 }
Note:
See TracChangeset
for help on using the changeset viewer.