person; $_roles= $_person['role_ids']; // if no site id redirect if( !$_GET['id'] ) { header( "location: index.php" ); exit(); } // get site_id $site_id= $_GET['id']; // if submitted if( $_POST['submitted'] ) { $new_site= $_POST['new_site']; // no primary site anymore.......... } // Print header require_once 'plc_drupal.php'; drupal_set_title('Sites'); include 'plc_header.php'; // if admin list all sites, else list just persons sites if( in_array( '10', $_roles ) ) $site_info= $api->GetSites( NULL, array( "site_id", "name" ) ); else $site_info= $api->GetSites( $_person['site_ids'], array( "site_id", "name" ) ); sort_sites( $site_info ); // start form echo "\n"; echo "

Switch Site

\n"; echo "Change active site to: \n"; echo "

\n"; echo "

This will change your Primary Site.\n"; echo "

\n"; echo "

Back to Site\n"; echo "\n"; // Print footer include 'plc_footer.php'; ?>