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