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

MySQL ' . mysql_result($res, 0, 'version') . ' ' . $strRunning . ' ' . $cfgServer['host']; if (!empty($cfgServer['port'])) { echo ':' . $cfgServer['port']; } if (!empty($cfgServer['socket'])) { 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') or mysql_die('', '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 && empty($cfgServer['only_db'])) { ?> 0) /** * Displays the phpMyAdmin related links */ ?>
= 40000) ? @ini_set('track_errors', 1) : ''; $stdlink = @$connect_func( $cfgServer['host'] . $server_port . $server_socket, $cfgServer['stduser'], $cfgServer['stdpass'] ); if ($stdlink == FALSE) { if (mysql_error()) { $conn_error = mysql_error(); } else if (isset($php_errormsg)) { $conn_error = $php_errormsg; } else { $conn_error = 'Cannot connect: invalid settings.'; } if (PHP_INT_VERSION >= 40000) { @ini_set('track_errors', $bkp_track_err); } $local_query = $connect_func . '(' . $cfgServer['host'] . $server_port . $server_socket . ', ' . $cfgServer['stduser'] . ', ' . $cfgServer['stdpass'] . ')'; mysql_die($conn_error, $local_query, FALSE, ''); } else if (PHP_INT_VERSION >= 40000) { @ini_set('track_errors', $bkp_track_err); } // Does user have global Create priv? $local_query = 'SELECT * FROM mysql.user WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\''; $rs_usr = mysql_query($local_query, $stdlink); if ($rs_usr) { $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) { $bkp_track_err = (PHP_INT_VERSION >= 40000) ? @ini_set('track_errors', 1) : ''; $userlink = @$connect_func( $cfgServer['host'] . $server_port . $server_socket, $cfgServer['user'], $cfgServer['password'] ); if ($userlink == FALSE) { if (mysql_error()) { $conn_error = mysql_error(); } else if (isset($php_errormsg)) { $conn_error = $php_errormsg; } else { $conn_error = 'Cannot connect: invalid settings.'; } if (PHP_INT_VERSION >= 40000) { @ini_set('track_errors', $bkp_track_err); } $local_query = $connect_func . '(' . $cfgServer['host'] . $server_port . $server_socket . ', ' . $cfgServer['user'] . ', ' . $cfgServer['password'] . ')'; mysql_die($conn_error, $local_query, FALSE, ''); } else if (PHP_INT_VERSION >= 40000) { @ini_set('track_errors', $bkp_track_err); } $local_query = 'SELECT Db FROM mysql.db WHERE User = \'' . sql_addslashes($cfgServer['user']) . '\''; $rs_usr = mysql_query($local_query, $stdlink); if ($rs_usr) { while ($row = mysql_fetch_array($rs_usr)) { if (!mysql_select_db($row['Db'], $userlink)) { $db_to_create = $row['Db']; $create = TRUE; break; } // end if } // end while } // end if mysql_free_result($rs_usr); } // end if // The user is allowed to create a db if ($create) { echo "\n"; ?>
MySQL
item

item  
item  
item  
item  
item  
item
item   (*)
item

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