0) { // Get the valid databases list $num_dbs = count($dblist); $dbs = @mysql_list_dbs() or mysql_die('', 'mysql_list_dbs()', '', 'main.php3?lang' . $lang . '&server=' . $server); while ($a_db = mysql_fetch_object($dbs)) { if (!$num_dbs) { $dblist[] = $a_db->Database; } else { $true_dblist[$a_db->Database] = ''; } } // end while mysql_free_result($dbs); if ($num_dbs && empty($true_dblist)) { $dblist = array(); } else if ($num_dbs) { for ($i = 0; $i < $num_dbs; $i++) { if (isset($true_dblist[$dblist[$i]])) { $dblist_valid[] = $dblist[$i]; } } if (isset($dblist_valid)) { $dblist = $dblist_valid; unset($dblist_valid); } else { $dblist = array(); } unset($true_dblist); } // Get the valid databases count $num_dbs = count($dblist); } else { $num_dbs = 0; } /** * Displays the page */ ?>