Revision 86aa4cc7
Added by Renato Botelho almost 15 years ago
usr/local/www/progress.php | ||
---|---|---|
12 | 12 |
$url = 'progress.php?UPLOAD_IDENTIFIER='. $_GET["UPLOAD_IDENTIFIER"] .'&e=1'; |
13 | 13 |
|
14 | 14 |
function nice_value($x) { |
15 |
if ($x < 100) $x; |
|
15 |
if ($x < 100) return $x;
|
|
16 | 16 |
if ($x < 10000) return sprintf("%.2fKB", $x/1000); |
17 | 17 |
if ($x < 900000) return sprintf("%dKB", $x/1000); |
18 | 18 |
return sprintf("%.2fMB", $x/1000/1000); |
... | ... | |
27 | 27 |
}else{ |
28 | 28 |
echo ('<HTML><meta HTTP-EQUIV="Refresh" CONTENT="1; url='. $url .'"><BODY></BODY></HTML>'); |
29 | 29 |
} |
30 |
exit; |
|
30 | 31 |
|
31 | 32 |
} else { |
32 | 33 |
|
... | ... | |
43 | 44 |
|
44 | 45 |
if ($X['bytes_total'] > 1 && $X['bytes_uploaded'] >= $X['bytes_total'] && $X['est_sec'] == 0) { |
45 | 46 |
echo ('<HTML><BODY onLoad="window.close()"> ' . gettext("UPLOAD completed") . '!</BODY></HTML>'); |
46 |
} else { |
|
47 |
exit; |
|
48 |
} |
|
49 |
} |
|
47 | 50 |
|
48 | 51 |
?> |
49 | 52 |
|
Also available in: Unified diff
Small logic fixes, gettext fixes and make php -l happy