From 7c4d6f10dcee2d2be4a4d9595c6f9722024f3b34 Mon Sep 17 00:00:00 2001 From: Andrew DeFaria Date: Wed, 5 May 2021 10:53:19 -0700 Subject: [PATCH] Minor changes --- maps/php/MAPS.php | 12 ++++- maps/php/Space.php | 114 +++++++++++++++++++++++---------------------- 2 files changed, 70 insertions(+), 56 deletions(-) diff --git a/maps/php/MAPS.php b/maps/php/MAPS.php index 0def4ba..9b94c17 100755 --- a/maps/php/MAPS.php +++ b/maps/php/MAPS.php @@ -57,6 +57,14 @@ function OpenDB() { or DBError("OpenDB: Unable to select MAPS database", "adefaria_maps"); } // OpenDB +function CloseDB() { + global $db; + + if (isset ($db)) { + mysqli_close($db); + } // if +} // CloseDB + function SetContext($new_userid) { global $userid; @@ -524,9 +532,11 @@ function Space() { strlen($row["subject"]) + strlen($row["timestamp"]) + strlen($row["data"]); - $space = $space + $msg_space; + $space += $msg_space; } // while + mysqli_free_result($result); + return $space; } // Space ?> diff --git a/maps/php/Space.php b/maps/php/Space.php index 9c4bd02..2e1f822 100755 --- a/maps/php/Space.php +++ b/maps/php/Space.php @@ -1,55 +1,59 @@ - - - - - - MAPS: Space Usage - - - -
-

MAPS -Space Usage for

-
-
- $one_meg) { - $space = number_format ($space / $one_meg, 1); - print "$Userid is using up $space Megabytes of space in the database"; - } elseif ($space > 0) { - $space = number_format ($space / 1024, 0); - print "$Userid is using up $space Kbytes of space in the database"; - } else { - print "$Userid is using up no space in the database"; - } // if - - copyright (2001); - ?> -
- - + + + + + + MAPS: Space Usage + + + +
+

MAPS +Space Usage for

+
+
+ $one_meg) { + $space = number_format ($space / $one_meg, 1); + print "$Userid is using up $space Megabytes of space in the database"; + } elseif ($space > 0) { + $space = number_format ($space / 1024, 0); + print "$Userid is using up $space Kbytes of space in the database"; + } else { + print "$Userid is using up no space in the database"; + } // if + + CloseDB(); + + copyright (2001); + ?> +
+ + -- 2.17.1