From: Andrew DeFaria Date: Wed, 5 May 2021 17:53:19 +0000 (-0700) Subject: Minor changes X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;h=7c4d6f10dcee2d2be4a4d9595c6f9722024f3b34;p=clearscm.git Minor changes --- 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); + ?> +
+ +