function getNetworkSites($excludeddomains="") {
global $wpdb;
$sites = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM wp_blogs WHERE blog_id != '1' AND archived = '0' AND mature = 0 AND spam = 0 AND deleted = 0 ORDER BY blog_id" ) );
foreach((array)$sites as $s) {
if (!@in_array($s->domain.$s->path,$excludeddomains)) {
$sites2[] = $s;
}
}
return $sites2;
}