no inactive servers) * * @return (array) An array of server information (similar to server_info) but without the other servers **/ function get_exportservers ($active = 1) { $query = "SELECT * FROM tserver WHERE export_server = 1"; $return = array (); if ($active == 1) { $servers = get_db_all_rows_sql ($query.' AND status = 1'); } else { $servers = get_db_all_rows_sql ($query); } if (empty ($servers)) { return $return; } foreach ($servers as $server) { $return[$server["id_server"]] = $server; } return $return; } /** * Gets a specific piece of info on the export servers table (defaults to name) * * @param (bool) $active (bool) Whether or not to exclude inactive servers (defaults to 1 => no inactive servers) * @param (string) $row What row to select from the server info table * * @return (array) An array of server information (similar to get_exportservers) but without the extra data **/ function get_exportservers_info ($active = 1, $row = "name") { $exportservers = get_exportservers (); $return = array (); foreach ($exportservers as $server_id => $server_info) { $return[$server_id] = $server_info[$row]; } return $return; } ?>