removed the "MySQL" column if no MySQL feature is allowed

This commit is contained in:
Loïc Chapeaux
2001-11-19 21:16:13 +00:00
parent dace5dd51c
commit 473abd55d8

View File

@@ -150,18 +150,6 @@ if ($server == 0 || count($cfgServers) > 1) {
*/
$is_superuser = FALSE;
if ($server > 0) {
?>
<!-- MySQL server related links -->
<td valign="top" align="<?php echo $cell_align_left; ?>">
<table>
<tr>
<th colspan="2">&nbsp;&nbsp;MySQL</th>
</tr>
<?php
echo "\n";
$common_url_query = 'lang=' . $lang . '&amp;server=' . $server;
// Get user's global privileges ($dbh and $userlink are links to MySQL
// defined in the "common.lib.php3" library)
$is_create_priv = FALSE;
@@ -204,7 +192,20 @@ if ($server > 0) {
$db_to_create = '';
} // end else
$common_url_query = 'lang=' . $lang . '&amp;server=' . $server;
// loic1: Displays the MySQL column only if at least one feature has to be
// displayed
if ($is_superuser || $is_create_priv || $is_process_priv || $is_reload_priv
|| $cfgShowMysqlInfo || $cfgShowMysqlVars) {
?>
<!-- MySQL server related links -->
<td valign="top" align="<?php echo $cell_align_left; ?>">
<table>
<tr>
<th colspan="2">&nbsp;&nbsp;MySQL</th>
</tr>
<?php
// The user is allowed to create a db
if ($is_create_priv) {
echo "\n";
@@ -257,9 +258,9 @@ if ($server > 0) {
</tr>
<?php
}
echo "\n";
if ($is_process_priv) {
echo "\n";
?>
<tr>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
@@ -271,9 +272,9 @@ if ($server > 0) {
</tr>
<?php
} // end if
echo "\n";
if ($is_reload_priv) {
echo "\n";
?>
<tr>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
@@ -285,9 +286,9 @@ if ($server > 0) {
</tr>
<?php
}
echo "\n";
if ($is_superuser) {
echo "\n";
?>
<tr>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
@@ -311,11 +312,10 @@ if ($server > 0) {
<?php
}
}
echo "\n";
// Logout for advanced authentication
if ($cfgServer['adv_auth'])
{
if ($cfgServer['adv_auth']) {
echo "\n";
?>
<tr>
<td valign="baseline"><img src="<?php echo $item_img; ?>" width="7" height="7" alt="item" /></td>
@@ -334,6 +334,7 @@ if ($server > 0) {
<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<?php
} // end if
} // end of if ($server > 0)
echo "\n";