function excluded_service($service) { // 10-19-2015. Exclude VTS Aggregates from Portal (though they are in SR). // error_log("SERVICE = " . print_r($service, true)); if ($service[SR_TABLE_FIELDNAME::SERVICE_TYPE] == SR_SERVICE_TYPE::AGGREGATE_MANAGER && lookup_service_attribute($service, SERVICE_ATTRIBUTE_AM_TYPE) == SERVICE_ATTRIBUTE_VTS_AM) { // error_log("Excluding VTS"); return true; } return false; }
function lookup_attribute($am_url, $attr_name) { $services = get_services(); $am_service = null; foreach ($services as $service) { if (array_key_exists(SR_ARGUMENT::SERVICE_URL, $service) && $service[SR_ARGUMENT::SERVICE_URL] == $am_url) { $am_service = $service; break; } } if ($am_service) { return lookup_service_attribute($am_service, $attr_name); } else { return null; } }