"; $layout_datas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $id_layout); $lines = array (); if ($layout_datas !== false) { foreach ($layout_datas as $layout_data) { // Linked to other layout ?? - Only if not module defined if ($layout_data['id_layout_linked'] != 0) { $status = return_status_layout ($layout_data['id_layout_linked']); } else { $id_agent = get_db_value ("id_agente", "tagente_estado", "id_agente_modulo", $layout_data['id_agente_modulo']); if ($layout_data['id_agente_modulo'] != 0) { $id_agent_module_parent = get_db_value ("id_agente_modulo", "tlayout_data", "id", $layout_data["parent_item"]); // Item value $status = return_status_agent_module ($layout_data['id_agente_modulo']); if ($layout_data['no_link_color'] == 1) $status_parent = -1; else $status_parent = return_status_agent_module ($id_agent_module_parent); } else { $interval = get_agent_interval ($id_agent); $sql = sprintf ('SELECT COUNT(*) FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.disabled = 0 AND tagente_modulo.id_agente = %d AND (utimestamp >= UNIX_TIMESTAMP() - module_interval * 2 OR (module_interval = 0 AND utimestamp >= UNIX_TIMESTAMP() - %d))', $id_agent, $interval * 2); $status = get_db_sql ($sql); } } // STATIC IMAGE (type = 0) if ($layout_data['type'] == 0) { // Link image //index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=1 if ($status == 0) // Bad monitor $z_index = 2; elseif ($status == 2) // Alert $z_index = 3; else $z_index = 1; // Print BAD over good // Draw image echo '