"") $g['theme'] = $config['theme']; else $g['theme'] = "pfsense"; $url = 'progress.php?UPLOAD_IDENTIFIER='. $_GET["UPLOAD_IDENTIFIER"] .'&e=1'; function nice_value($x) { if ($x < 100) return $x; if ($x < 10000) return sprintf("%.2fKB", $x/1000); if ($x < 900000) return sprintf("%dKB", $x/1000); return sprintf("%.2fMB", $x/1000/1000); } $X = upload_progress_meter_get_info( $_GET["UPLOAD_IDENTIFIER"] ); if (!$X) { if ( array_key_exists( "e", $_GET ) ) { echo "" . gettext("Invalid Meter ID") . "! {$_GET["UPLOAD_IDENTIFIER"]}"; echo (''); }else{ echo (''); } exit; } else { $meter = sprintf("%.2f", $X['bytes_uploaded'] / $X['bytes_total'] * 100); $sp = $X['speed_last']; if ($sp < 10000) $speed = sprintf("%.2f", $sp / 1000); else $speed = sprintf("%d", $sp / 1000); $eta = sprintf("%02d:%02d", $X['est_sec'] / 60, $X['est_sec'] % 60 ); $upl = nice_value($X['bytes_uploaded']); $total = nice_value($X['bytes_total']); if ($X['bytes_total'] > 1 && $X['bytes_uploaded'] >= $X['bytes_total'] && $X['est_sec'] == 0) { echo (' ' . gettext("UPLOAD completed") . '!'); exit; } } ?> <?=gettext("Uploading Files... Please wait..."); ?>

");?>

%