GetSites( array("enabled" => False, "peer_id" => NULL)); if (!empty($sites)) { print("
Site Name | site_id | Submitted |
---|---|---|
%s | ", $site['site_id'], $site['name']); printf("%d | ", $site['site_id'], $site['site_id']); printf("%s |
No open join requests
"); } } function render_join_request_review($api, $site_id) { $sites = $api->GetSites( array(intval($site_id)) ); if (empty($sites)) { print("Invalid request with site_id=$site_id
"); return; } $site = $sites[0]; if ($site['enabled']) { print("This site is already enabled
"); return; } $addresses = $api->GetAddresses ($site['address_ids']); if (empty ($addresses)) { print("No address found for site_id=$site_id
"); return ; } $address = $addresses[0]; $address_id=$address['address_id']; # just in case there is no person attached yet if (empty ($site['person_ids'])) { $persons=array(); } else { $person_ids = $site['person_ids']; $persons = $api->GetPersons( $person_ids, array( "person_id", "role_ids", "first_name", "last_name", "title", "email" , "phone") ); } $tech = Null; $pi = Null; foreach($persons as $person) { if ( in_array('20', $person['role_ids']) ) { $pi = $person; } if ( in_array('40', $person['role_ids']) ) { $tech = $person; } } $pi_id = $pi['person_id']; $tech_id = $tech['person_id']; print <<< EOFPlease review the join request below.
Warning: the PI email address that was provided in this form will not be checked automatically. We expect that as part of the handshake with the site, the support team has had an opportunity to use this address so it can be considered safe. Please check it manually if this is not the case.