do the magic include('magic-add-cloned-sites.php'); } else { //Normal adminpage display // fetch existing blogs //$the_blogs = get_blog_list( 1, 'all' ); could this also work? ->later $tbl_blogs = $wpdb->prefix ."blogs"; $the_blogs = $wpdb->get_results( "SELECT blog_id, domain, path FROM $tbl_blogs WHERE blog_id <> '1'" ); if (!$subdomain_install) { // trim each value in the array from slashes (subdirs) function removeslash(&$value) { $value = str_replace("/", "", $value); } for ( $i = 0; $i < sizeof( $the_blogs ); $i++ ) { array_walk($the_blogs[$i], 'removeslash'); } } // fetch existing users $tbl_users = $wpdb->prefix ."users"; $the_users = $wpdb->get_results( "SELECT ID, user_login FROM $tbl_users" ); // check for errors if(!$the_blogs) { $error['blogs'] = "there are no templates to choose from"; } if(!$the_users) { $error['users'] = "there are no users, which is impossible.."; } // if there are no errors continue if(!$error) { ?>