Ignore:
Timestamp:
Feb 23, 2015, 12:32:54 AM (9 years ago)
Author:
chronos
Message:
  • Modified: Do not link to external jquery script which can change in future and break function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Export/Progress.php

    r816 r818  
    33include_once(dirname(__FILE__).'/../../includes/global.php');
    44
    5   $System = new System();
    6   $System->DoNotShowPage = true;
    7   $System->Run();
     5$System = new System();
     6$System->DoNotShowPage = true;
     7$System->Run();
    88
     9$Output = '';
     10if(!array_key_exists('RedirectId', $_GET)) exit;
    911
    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
     16while($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">'.
    1924      'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&ExportId='.$_GET['RedirectId']).'\'", 500)'.
    20       '</script>';
    21     }
     25      '</script>');
     26}
    2227
    23     echo $Output;
    24     //echo ''.ProgressBar(300, $Task['Progress']).'';
    25 
     28echo($Output);
     29//echo ''.ProgressBar(300, $Task['Progress']).'';
Note: See TracChangeset for help on using the changeset viewer.