0) { $local_query = 'SELECT VERSION() as version, USER() as user'; $res = mysql_query($local_query) or PMA_mysqlDie('', $local_query, FALSE, ''); echo '

MySQL ' . mysql_result($res, 0, 'version') . ' ' . $strRunning . ' ' . $cfgServer['host']; if (!empty($cfgServer['port'])) { echo ':' . $cfgServer['port']; } // loic1: skip this because it's not a so good idea to display sockets // used to everybody // if (!empty($cfgServer['socket']) && PMA_PHP_INT_VERSION >= 30010) { // echo ':' . $cfgServer['socket']; // } echo ' ' . $strRunningAs . ' ' . mysql_result($res, 0, 'user') . '


' . "\n"; } // end if /** * Reload mysql (flush privileges) */ if (($server > 0) && isset($mode) && ($mode == 'reload')) { $result = mysql_query('FLUSH PRIVILEGES'); // Debug: or PMA_mysqlDie('', 'FLUSH PRIVILEGES', FALSE, 'main.php3?lang=' . $lang . '&server=' . $server); echo '

'; if ($result != 0) { echo $strMySQLReloaded; } else { echo $strReloadFailed; } echo '

' . "\n\n"; } /** * Displays the MySQL servers choice form */ if ($server == 0 || count($cfgServers) > 1) { ?>

0) { // Get user's global privileges ($dbh and $userlink are links to MySQL // defined in the "common.lib.php3" library) $is_create_priv = FALSE; $is_process_priv = FALSE; $is_reload_priv = FALSE; $is_superuser = @mysql_query('USE mysql', $userlink); if ($dbh) { $local_query = 'SELECT Create_priv, Process_priv, Reload_priv FROM mysql.user WHERE User = \'' . PMA_sqlAddslashes($cfgServer['user']) . '\' OR User = \'\''; $rs_usr = mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE); if ($rs_usr) { $result_usr = mysql_fetch_array($rs_usr); $is_create_priv = ($result_usr['Create_priv'] == 'Y'); $is_process_priv = ($result_usr['Process_priv'] == 'Y'); $is_reload_priv = ($result_usr['Reload_priv'] == 'Y'); mysql_free_result($rs_usr); } // end if } // end if // If the user has Create priv on a inexistant db, 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 (!$is_create_priv) { $local_query = 'SELECT DISTINCT Db FROM mysql.db WHERE Create_priv = \'Y\' AND (User = \'' . PMA_sqlAddslashes($cfgServer['user']) . '\' OR User = \'\')'; $rs_usr = mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE); if (@mysql_numrows($rs_usr) > 0) { while ($row = mysql_fetch_array($rs_usr)) { if (!mysql_select_db($row['Db'], $dbh)) { $re = '(^|(\\\\\\\\)+|[^\])'; $row['Db'] = ereg_replace($re . '%', '\\1...', ereg_replace($re . '_', '\\1?', $row['Db'])); $db_to_create = $row['Db']; $is_create_priv = TRUE; break; } // end if } // end while mysql_free_result($rs_usr); } // end if } // end if else { $db_to_create = ''; } // 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 || $cfgServer['adv_auth']) { ?> 0) echo "\n"; /** * Displays the phpMyAdmin related links */ ?>
= 32303) { echo "\n"; ?>
  MySQL
item

item  
item  
item  
item  
item  
item
item   (*)
    
  phpMyAdmin
item
Language:
item
item
item
item
      [ChangeLog]    [CVS]    [Lists]