%d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period); $string_type = 1; } else { $sql = sprintf ("SELECT * FROM tagente_datos WHERE id_agente_modulo = %d AND utimestamp > %d ORDER BY utimestamp DESC", $module_id, get_system_time () - $period); $string_type = 0; } $result = get_db_all_rows_sql ($sql); if ($result === false) { $result = array (); } echo "

".__('Received data from')." ".get_agentmodule_agent_name ($module_id)." / ".get_agentmodule_name ($module_id)."

"; echo "

".human_time_description ($period) ."

"; $table->cellpadding = 3; $table->cellspacing = 3; $table->width = 600; $table->class = "databox"; $table->head = array (); $table->data = array (); $table->align = array (); $table->head[0] = __('Delete'); $table->align[0] = 'center'; $table->head[1] = __('Timestamp'); $table->align[1] = 'center'; $table->head[2] = __('Data'); $table->align[2] = 'center'; foreach ($result as $row) { $data = array (); if (give_acl ($config['id_user'], $group, "AW") ==1) { if ($string_type == 0) { $data[0] = ''; } else { $data[0] = ''; } } else { $data[0] = ''; } $data[1] = print_timestamp ($row["utimestamp"], true); if (is_numeric ($row["datos"])) { $data[2] = format_for_graph ($row["datos"]); } else { $data[2] = safe_input ($row["datos"]); } array_push ($table->data, $data); } if (empty ($table->data)) { echo '

'.__('There was a problem locating the source of the graph').'

'; } else { print_table ($table); unset ($table); } ?>