0) {
PMA_availableDatabases(); // this function is defined in "common.lib.php3"
} else {
$num_dbs = 0;
}
/**
* Send http headers
*/
// Don't use cache (required for Opera)
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: ' . $now);
header('Last-Modified: ' . $now);
header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
header('Pragma: no-cache'); // HTTP/1.0
// Define the charset to be used
header('Content-Type: text/html; charset=' . $charset);
/**
* Displays the frame
*/
// Gets the font sizes to use
PMA_setFontSizes();
?>
phpMyAdmin
1) {
echo "\n";
?>
1)
else if ($num_dbs == 1) {
echo "\n";
?>
1) {
$selected_db = 0;
// Gets the tables list per database
for ($i = 0; $i < $num_dbs; $i++) {
$db = $dblist[$i];
$j = $i + 2;
if (!empty($db_start) && $db == $db_start) {
$selected_db = $j;
}
$tables = @mysql_list_tables($db);
$num_tables = @mysql_numrows($tables);
$common_url_query = 'lang=' . $lang
. '&server=' . $server
. '&db=' . urlencode($db);
if ($num_tables) {
$num_tables_disp = $num_tables;
} else {
$num_tables_disp = '-';
}
// Get additional infomation about tables for tooltip
if ($cfgShowTooltip && PMA_MYSQL_INT_VERSION >= 32303
&& $num_tables) {
$tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
while ($tmp = mysql_fetch_array($result)) {
$tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '')
. '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')';
} // end while
} // end if
// Displays the database name
$on_mouse = (($cfgLeftPointerColor == '') ? '' : ' onmouseover="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftPointerColor . '\')}" onmouseout="if (isDOM || isIE4) {hilightBase(\'el' . $j . '\', \'' . $cfgLeftBgColor . '\')}"');
echo "\n";
echo ' ';
if (!empty($num_tables)) {
echo "\n";
?>
()
1)
// Case where only one database has to be displayed
else if ($num_dbs == 1) {
$db = $dblist[0];
$tables = @mysql_list_tables($db);
$num_tables = @mysql_numrows($tables);
$common_url_query = 'lang=' . $lang
. '&server=' . $server
. '&db=' . urlencode($db);
if ($num_tables) {
$num_tables_disp = $num_tables;
} else {
$num_tables_disp = '-';
}
// Get additional infomation about tables for tooltip
if ($cfgShowTooltip && PMA_MYSQL_INT_VERSION >= 32303
&& $num_tables) {
$tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db));
while ($tmp = mysql_fetch_array($result)) {
$tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '')
. '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')';
} // end while
} // end if
// Displays the database name
echo "\n";
?>
' . $strNoDatabases . '';
} // end if ($num_dbs == 0)
echo "\n";
?>