/** * Gets the properties of from all the given profiles. * * @param array $profiles * The profiles to get properties for. * @param array $headers * Header information from the data file. * * @return array * Array of property values for the profiles. */ function fiftyone_degrees_get_property_data($profiles, $headers) { global $_fiftyone_degrees_needed_properties; $_51d = array(); $properties = array(); for ($i = 0; $i < $headers['property_count']; $i++) { $property = fiftyone_degrees_read_property($i, $headers); if (fiftyone_degrees_is_needed_property($property)) { $properties[] = $property; } } $device_ids = array(); $_51d = array(); foreach ($profiles as $profile) { $device_ids[$profile['component_id']] = $profile['unique_id']; $profile_values = fiftyone_degrees_get_profile_property_values($profile, $properties, $headers); $_51d = array_merge($_51d, $profile_values); } ksort($device_ids); $_51d['DeviceId'] = implode('-', $device_ids); return $_51d; }
* ********************************************************************* */ require_once 'ExampleMaster.php'; require_once '../core/51Degrees.php'; ?> <html> <head> <title>51Degrees Image Optimser Gallery</title> <?php fiftyone_degrees_echo_header(); ?> </head> <body> <?php fiftyone_degrees_echo_menu(); ?> <div id="Content"> <?php if (array_key_exists('ProfileId', $_GET)) { $profile_id = $_GET['ProfileId']; $headers = fiftyone_degrees_get_headers(); $profile = fiftyone_degrees_get_profile_from_id($profile_id, $headers); $properties = fiftyone_degrees_get_profile_property_values($profile, NULL, $headers); fiftyone_degrees_echo_properties($properties); } ?> </div> </body> </html>