* fixed bug #468749 (Left Frame not expanding in iCab)
* fixed warnings * fixed some bugs in the way servers are displayed in the servers choice combo
This commit is contained in:
43
main.php3
43
main.php3
@@ -27,7 +27,7 @@ else if (isset($reload) && $reload) {
|
|||||||
?>
|
?>
|
||||||
<script type="text/javascript" language="javascript1.2">
|
<script type="text/javascript" language="javascript1.2">
|
||||||
<!--
|
<!--
|
||||||
window.parent.frames['nav'].location.replace('./left.php3?lang=<?php echo $lang; ?>&server=<?php echo $server; ?>');
|
window.parent.frames['nav'].location.replace('./left.php3?lang=<?php echo $lang; ?>&server=<?php echo $server; ?>');
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
@@ -61,7 +61,7 @@ if ($server > 0) {
|
|||||||
* Reload mysql (flush privileges)
|
* Reload mysql (flush privileges)
|
||||||
*/
|
*/
|
||||||
if (($server > 0) && isset($mode) && ($mode == 'reload')) {
|
if (($server > 0) && isset($mode) && ($mode == 'reload')) {
|
||||||
$result = mysql_query('FLUSH PRIVILEGES') or mysql_die('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?lang=' . $lang . '&server=' . $server);
|
$result = mysql_query('FLUSH PRIVILEGES'); // Debug: or mysql_die('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?lang=' . $lang . '&server=' . $server);
|
||||||
echo '<p><b>';
|
echo '<p><b>';
|
||||||
if ($result != 0) {
|
if ($result != 0) {
|
||||||
echo $strMySQLReloaded;
|
echo $strMySQLReloaded;
|
||||||
@@ -102,8 +102,14 @@ if ($server == 0 || count($cfgServers) > 1) {
|
|||||||
if (!empty($val['port'])) {
|
if (!empty($val['port'])) {
|
||||||
echo ':' . $val['port'];
|
echo ':' . $val['port'];
|
||||||
}
|
}
|
||||||
|
if (!empty($val['socket'])) {
|
||||||
|
echo ':' . $val['socket'];
|
||||||
|
}
|
||||||
|
// loic1: if 'only_db' is an array and there is more than one
|
||||||
|
// value, displaying such informations may not be a so good
|
||||||
|
// idea
|
||||||
if (!empty($val['only_db'])) {
|
if (!empty($val['only_db'])) {
|
||||||
echo ' - ' . $val['only_db'];
|
echo ' - ' . (is_array($val['only_db']) ? implode(', ', $val['only_db']) : $val['only_db']);
|
||||||
}
|
}
|
||||||
if (!empty($val['user']) && !($val['adv_auth'])) {
|
if (!empty($val['user']) && !($val['adv_auth'])) {
|
||||||
echo ' (' . $val['user'] . ')';
|
echo ' (' . $val['user'] . ')';
|
||||||
@@ -145,7 +151,7 @@ if ($server > 0
|
|||||||
<?php
|
<?php
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
$common_url_query = 'lang=' . $lang . '&server=' . $server;
|
$common_url_query = 'lang=' . $lang . '&server=' . $server;
|
||||||
|
|
||||||
// 1. With authentication
|
// 1. With authentication
|
||||||
if ($cfgServer['adv_auth'])
|
if ($cfgServer['adv_auth'])
|
||||||
@@ -184,6 +190,7 @@ if ($server > 0
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Does user have global Create priv?
|
// Does user have global Create priv?
|
||||||
|
$create = FALSE;
|
||||||
$local_query = 'SELECT * FROM mysql.user WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\'';
|
$local_query = 'SELECT * FROM mysql.user WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\'';
|
||||||
$rs_usr = mysql_query($local_query, $stdlink);
|
$rs_usr = mysql_query($local_query, $stdlink);
|
||||||
if ($rs_usr) {
|
if ($rs_usr) {
|
||||||
@@ -233,8 +240,8 @@ if ($server > 0
|
|||||||
break;
|
break;
|
||||||
} // end if
|
} // end if
|
||||||
} // end while
|
} // end while
|
||||||
|
mysql_free_result($rs_usr);
|
||||||
} // end if
|
} // end if
|
||||||
mysql_free_result($rs_usr);
|
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
// The user is allowed to create a db
|
// The user is allowed to create a db
|
||||||
@@ -265,7 +272,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW STATUS'); ?>&goto=main.php3">
|
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW STATUS'); ?>&goto=main.php3">
|
||||||
<?php echo $strMySQLShowStatus; ?></a>
|
<?php echo $strMySQLShowStatus; ?></a>
|
||||||
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -273,7 +280,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW VARIABLES'); ?>&goto=main.php3">
|
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW VARIABLES'); ?>&goto=main.php3">
|
||||||
<?php echo $strMySQLShowVars;?></a>
|
<?php echo $strMySQLShowVars;?></a>
|
||||||
<?php echo show_docu('manual_Performance.html#Performance') . "\n"; ?>
|
<?php echo show_docu('manual_Performance.html#Performance') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -281,12 +288,12 @@ if ($server > 0
|
|||||||
<?php
|
<?php
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
if ($result_usr['Process_priv'] == 'Y') {
|
if (isset($result_usr) && $result_usr['Process_priv'] == 'Y') {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW PROCESSLIST'); ?>&goto=main.php3">
|
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW PROCESSLIST'); ?>&goto=main.php3">
|
||||||
<?php echo $strMySQLShowProcess; ?></a>
|
<?php echo $strMySQLShowProcess; ?></a>
|
||||||
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -295,12 +302,12 @@ if ($server > 0
|
|||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result_usr['Reload_priv'] == 'Y') {
|
if (isset($result_usr) && $result_usr['Reload_priv'] == 'Y') {
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="main.php3?<?php echo $common_url_query; ?>&mode=reload">
|
<a href="main.php3?<?php echo $common_url_query; ?>&mode=reload">
|
||||||
<?php echo $strReloadMySQL; ?></a>
|
<?php echo $strReloadMySQL; ?></a>
|
||||||
<?php echo show_docu('manual_Reference.html#FLUSH') . "\n"; ?>
|
<?php echo show_docu('manual_Reference.html#FLUSH') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -315,7 +322,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="user_details.php3?<?php echo $common_url_query; ?>&db=mysql&table=user">
|
<a href="user_details.php3?<?php echo $common_url_query; ?>&db=mysql&table=user">
|
||||||
<?php echo $strUsers; ?></a>
|
<?php echo $strUsers; ?></a>
|
||||||
<?php echo show_docu('manual_Privilege_system.html#Privilege_system') . "\n"; ?>
|
<?php echo show_docu('manual_Privilege_system.html#Privilege_system') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -339,7 +346,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="index.php3?<?php echo $common_url_query; ?>&old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>" target="_parent">
|
<a href="index.php3?<?php echo $common_url_query; ?>&old_usr=<?php echo urlencode($PHP_AUTH_USER); ?>" target="_parent">
|
||||||
<b><?php echo $strLogout; ?></b></a>
|
<b><?php echo $strLogout; ?></b></a>
|
||||||
<a href="<?php echo $cfgPmaAbsoluteUri; ?>Documentation.html#login_bug" target="documentation">(*)</a>
|
<a href="<?php echo $cfgPmaAbsoluteUri; ?>Documentation.html#login_bug" target="documentation">(*)</a>
|
||||||
</td>
|
</td>
|
||||||
@@ -371,7 +378,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW STATUS'); ?>&goto=main.php3">
|
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW STATUS'); ?>&goto=main.php3">
|
||||||
<?php echo $strMySQLShowStatus; ?></a>
|
<?php echo $strMySQLShowStatus; ?></a>
|
||||||
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -380,7 +387,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW VARIABLES'); ?>&goto=main.php3">
|
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW VARIABLES'); ?>&goto=main.php3">
|
||||||
<?php echo $strMySQLShowVars; ?></a>
|
<?php echo $strMySQLShowVars; ?></a>
|
||||||
<?php echo show_docu('manual_Performance.html#Performance') . "\n"; ?>
|
<?php echo show_docu('manual_Performance.html#Performance') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -389,7 +396,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW PROCESSLIST'); ?>&goto=main.php3">
|
<a href="sql.php3?<?php echo $common_url_query; ?>&db=mysql&sql_query=<?php echo urlencode('SHOW PROCESSLIST'); ?>&goto=main.php3">
|
||||||
<?php echo $strMySQLShowProcess; ?></a>
|
<?php echo $strMySQLShowProcess; ?></a>
|
||||||
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
<?php echo show_docu('manual_Reference.html#SHOW') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -398,7 +405,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="main.php3?<?php echo $common_url_query; ?>&mode=reload">
|
<a href="main.php3?<?php echo $common_url_query; ?>&mode=reload">
|
||||||
<?php echo $strReloadMySQL; ?></a>
|
<?php echo $strReloadMySQL; ?></a>
|
||||||
<?php echo show_docu('manual_Reference.html#FLUSH') . "\n"; ?>
|
<?php echo show_docu('manual_Reference.html#FLUSH') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
@@ -411,7 +418,7 @@ if ($server > 0
|
|||||||
<tr>
|
<tr>
|
||||||
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
<td valign="baseline"><img src="images/item.gif" width="7" height="7" alt="item" /></td>
|
||||||
<td>
|
<td>
|
||||||
<a href="user_details.php3?<?php echo $common_url_query; ?>&db=mysql&table=user">
|
<a href="user_details.php3?<?php echo $common_url_query; ?>&db=mysql&table=user">
|
||||||
<?php echo $strUsers; ?></a>
|
<?php echo $strUsers; ?></a>
|
||||||
<?php echo show_docu('manual_Privilege_system.html#Privilege_system') . "\n"; ?>
|
<?php echo show_docu('manual_Privilege_system.html#Privilege_system') . "\n"; ?>
|
||||||
</td>
|
</td>
|
||||||
|
Reference in New Issue
Block a user