0) { $server_info = $cfgServer['host'] . (empty($cfgServer['port']) ? '' : ':' . $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) { // $server_info .= ':' . $cfgServer['socket']; // } $local_query = 'SELECT VERSION() as version, USER() as user'; $res = mysql_query($local_query) or PMA_mysqlDie('', $local_query, FALSE, ''); $mysql_cur_user = mysql_result($res, 0, 'user'); $full_string = str_replace('%pma_s1%', mysql_result($res, 0, 'version'), $strMySQLServerProcess); $full_string = str_replace('%pma_s2%', $server_info, $full_string); $full_string = str_replace('%pma_s3%', $mysql_cur_user, $full_string); echo '

' . $full_string . '


' . "\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) $mysql_cur_user = substr($mysql_cur_user, 0, strpos($mysql_cur_user, '@')); $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($mysql_cur_user) . '\''; $rs_usr = mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE); if ($rs_usr) { while ($result_usr = mysql_fetch_array($rs_usr)) { if (!$is_create_priv) { $is_create_priv = ($result_usr['Create_priv'] == 'Y'); } if (!$is_process_priv) { $is_process_priv = ($result_usr['Process_priv'] == 'Y'); } if (!$is_reload_priv) { $is_reload_priv = ($result_usr['Reload_priv'] == 'Y'); } } // end while 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($mysql_cur_user) . '\''; $rs_usr = mysql_query($local_query, $dbh); // Debug: or PMA_mysqlDie('', $local_query, FALSE); if ($rs_usr) { $re = '(^|(\\\\\\\\)+|[^\])'; while ($row = mysql_fetch_array($rs_usr)) { if (ereg($re . '%|_', $row['Db']) || !mysql_select_db($row['Db'], $userlink) && @mysql_errno() != 1044) { $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; if ($is_superuser) { $cfgShowMysqlInfo = TRUE; $cfgShowMysqlVars = TRUE; $cfgShowChgPassword = TRUE; } if ($cfgServer['auth_type'] == 'config') { $cfgShowChgPassword = FALSE; } // 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 || $cfgShowChgPassword || $cfgServer['auth_type'] != 'config') { ?> 0) echo "\n"; /** * Displays the phpMyAdmin related links */ ?>
= 32303) { echo "\n"; ?> (*)' : ''; echo "\n"; ?>
  MySQL
item

item  
item  
item  
item  
item  
item
item
item  
    
  phpMyAdmin
item
Language:
item
item
item
item
      [ChangeLog]    [CVS]    [Lists]