0) {
available_databases(); // 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
set_font_sizes();
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 && MYSQL_INT_VERSION >= 32303
&& $num_tables) {
$tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db));
while ($tmp = mysql_fetch_array($result)) {
// loic1: use md5 to ensure the key use valid characters only
$tooltip[md5($tmp['Name'])] = rtrim($tmp['Comment'] . ' (' . $tmp['Rows'] . ' ' . $strRows . ')');
} // end while
} // end if
// Displays the database name
echo "\n";
?>