summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-24 03:17:33 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-24 03:17:33 +0000
commitee0b88a6e241e400e95e56ad44c791517a389aaa (patch)
tree0d0e15294aa758be16d7d8b36848a063c4cae479 /usr/local
parent8999038a6c5b85cd9efb1a6fbced532128ebf87a (diff)
downloadpfsense-ee0b88a6e241e400e95e56ad44c791517a389aaa.zip
pfsense-ee0b88a6e241e400e95e56ad44c791517a389aaa.tar.gz
Untangle the if / else mess
Diffstat (limited to 'usr/local')
-rw-r--r--usr/local/www/upload_progress.php22
1 files changed, 6 insertions, 16 deletions
diff --git a/usr/local/www/upload_progress.php b/usr/local/www/upload_progress.php
index 7df83ff..b79d31d 100644
--- a/usr/local/www/upload_progress.php
+++ b/usr/local/www/upload_progress.php
@@ -41,7 +41,7 @@ include("guiconfig.inc");
// sanitize the ID value
$id = $_SESSION['uploadid'];
if (!$id) {
- echo "Invalid upload id#.";
+ echo "Sorry, we could not find a uploadid code.";
exit;
}
@@ -50,19 +50,15 @@ $info = uploadprogress_get_info($id);
// false is returned if the data isn't found
if (!$info) {
-
echo "Could not locate progress {$id}. Trying again...";
echo "<html><meta http-equiv=\"Refresh\" CONTENT=\"1; url=upload_progress.php?uploadid={$id}\"><body></body></html>";
exit;
+}
-} else {
-
- if (intval($info['percent']) > "99") {
-
- //echo ('<html><body onLoad="window.close()"> UPLOAD completed!</body></html>');
- echo ('<html><body> UPLOAD completed!</body></html>');
-
- } else {
+if (intval($info['percent']) > "99") {
+ echo ('<html><body onLoad="window.close()"><&nbsp;<p>&nbsp;<p><center><b>UPLOAD completed!</b></center></body></html>');
+ exit;
+}
?>
@@ -138,9 +134,3 @@ if (!$info) {
</table>
</body>
</html>
-
-<?php
-
-}}
-
-?>
OpenPOWER on IntegriCloud