';
reset($available_languages);
while (list($id,$tmplang) = each($available_languages)) {
$lang_name = ucfirst(substr(strstr($tmplang[0], '|'), 1));
echo "\n";
?>
[ ]
\n";
}
/**
* Displays the welcome message and the server informations
*/
echo "
$strWelcome phpMyAdmin ";
echo PHPMYADMIN_VERSION;
echo "
\n";
// Don't display server info if $server == 0 (no server selected)
if ($server > 0) {
$res_version = mysql_query('SELECT Version() as version') or mysql_die();
$row_version = mysql_fetch_array($res_version);
echo 'MySQL ' . $row_version['version'] . ' ' . $strRunning . ' ' . $cfgServer['host'];
if (!empty($cfgServer['port'])) {
echo ':' . $cfgServer['port'];
}
echo "
\n";
}
/**
* Reload mysql (flush privileges)
*/
if (($server > 0) && isset($mode) && ($mode == 'reload')) {
$result = mysql_query('FLUSH PRIVILEGES');
echo '';
if ($result != 0) {
echo $strMySQLReloaded;
} else {
echo $strReloadFailed;
}
echo '
' . "\n";
}
/**
* Displays the servers choice form and/or the server-related links
*/
?>
1)
{
?>
-
0 (a server selected)
if ($server > 0
&& empty($cfgServer['only_db']))
{
// 2.1. With authentification
if ($cfgServer['adv_auth'])
{
// Get user's rights
if (empty($cfgServer['port'])) {
$dbh = mysql_connect($cfgServer['host'], $cfgServer['stduser'], $cfgServer['stdpass']);
} else {
$dbh = mysql_connect($cfgServer['host'] . ':' . $cfgServer['port'], $cfgServer['stduser'], $cfgServer['stdpass']);
}
// Does user have global Create priv?
$rs_usr = mysql_query('select * from mysql.user where User="' . $cfgServer['user'] . '"', $dbh);
$result_usr = mysql_fetch_array($rs_usr);
$create = ($result_usr['Create_priv'] == 'Y');
$db_to_create = "";
// Does user have Create priv on a inexistant db?
// if yes, show him in the dialog the first inexistant db name
// that we find, in most cases it's probably the one he just dropped :)
// (Note: we only get here after a browser reload, I don't know why)
if (!$create) {
$rs_usr = mysql_query('select Db from mysql.db where User="'
. $cfgServer['user'] . '"', $dbh);
while ($row = mysql_fetch_array($rs_usr)) {
if (!mysql_select_db($row['Db'])) {
$db_to_create = $row['Db'];
$create=true;
break;
}
}
}
// The user is allowed the create a db
if ($create) {
echo "\n";
?>
-
-
-
-
-
-
-
-
-
-
-
-
0)
?>
-
phpMyAdmin
-
-
[ChangeLog]