$conn = $db->connect();
$ip = GET('ip');
$tree = GET('tree');
ossim_valid($ip, OSS_IP_ADDR, 'illegal:' . _("Ip Address"));
$length_name = !empty($_GET['length_name']) ? GET('length_name') : 40;
if (ossim_error()) {
    $ossim_error = true;
}
$image_url = "../../pixmaps/theme/";
$icon1 = $image_url . 'any.png';
$icon2 = $image_url . 'ltError.gif';
$empty_tree = "[{title: '<span class=\\'size12n\\'>" . _("Properties") . "</span>', key:'0', isFolder:true, icon:'{$icon1}', hideCheckbox: true, \n\t\tchildren:[{title: '<span>" . _("No data found") . "</span>', addClass:'bold_red', key:'load_error', isFolder:false, hideCheckbox: true, icon:'{$icon2}'}]}]";
switch ($tree) {
    case "tree_container_1":
        $properties_types = Host::get_properties_types($conn);
        $properties = Host::get_host_properties($conn, $ip, '', 'ord, date DESC');
        $grouped_properties = array();
        $services_list = Host_services::get_ip_data($conn, $ip, '1');
        if (count($properties_types) == 0 || $ossim_error) {
            echo $empty_tree;
            exit;
        }
        foreach ($properties_types as $k => $v) {
            if ($v['name'] != 'Service') {
                $grouped_properties[$v['name'] . "###" . $v['id'] . "###" . $v['description']] = array();
            }
        }
        if (count($properties) > 0) {
            foreach ($properties as $k => $v) {
                $grouped_properties[ucwords($v['property']) . "###" . $v['property_ref'] . "###" . $v['description']][] = array("id" => $v['id'], "sensor" => $v['sensor'], "date" => $v['date'], "property_id" => $v['property_ref'], "property" => $v['property'], "source_ref" => $v['source_id'], "source" => $v['source'], "value" => $v['value'], "extra" => $v['extra'], "anom" => $v['anom']);
            }
 </th>
							<th class="tableServices_t2"> <?php 
echo _("Version");
?>
 </th>
							<th class="tableServices_t3"> <?php 
echo _("Date");
?>
 </th>
						</tr>
					</table>
				  
					<table id="tableServices" class="noborder">
						<?php 
$services_list = Host_services::get_ip_data($conn, $host, "");
$property_list = Host::get_host_properties($conn, $host);
$temp_array = array_merge($services_list, $property_list);
usort($temp_array, 'orderArray');
//
if (!empty($temp_array)) {
    $i = 1;
    foreach ($temp_array as $services) {
        $bgcolor = $i % 2 == 0 ? "#E1EFE0" : "#FFFFFF";
        ?>
								<tr>
								<?php 
        if (empty($services['id'])) {
            // Services
            ?>
										<td class="tableServices_t1" bgcolor="<?php 
            echo $bgcolor;