Ensure the "db_stats.php3" script can only be ran by a super-user

This commit is contained in:
Loïc Chapeaux
2002-05-01 09:00:16 +00:00
parent 58d0b27bf4
commit 95daed4ec9
2 changed files with 13 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2002-05-01 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_properties.php3; tbl_properties_table_info.php3: comments.
* tbl_properties_options.php3: added labels and beautified display.
* db_stats.php3, lines 12-22: ensure this script can only be ran by a
super-user.
2002-04-30 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* lang/italian.inc.php3: updated thanks to Pietro Danesi.

View File

@@ -9,6 +9,17 @@ require('./libraries/grab_globals.lib.php3');
require('./header.inc.php3');
/**
* Ensures the current user is super-user
*/
if (!@mysql_query('USE mysql', $userlink)) {
echo '<p><b>' . $strError . '</b></p>' . "\n";
echo '<p>&nbsp;&nbsp;&nbsp;&nbsp;' . $strNoRights . '</p>' . "\n";
include('./footer.inc.php3');
exit();
} // end if
/**
* Drop databases if required
*/