2008-08-22 20:07:32 +02:00
|
|
|
<?php
|
|
|
|
|
2009-06-08 20:15:58 +02:00
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-04-01 15:53:11 +02:00
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation for version 2.
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
2009-06-08 20:15:58 +02:00
|
|
|
|
2008-08-22 20:07:32 +02:00
|
|
|
|
|
|
|
|
2006-03-27 05:37:27 +02:00
|
|
|
require("include/config.php");
|
2008-06-19 02:24:05 +02:00
|
|
|
check_login();
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
if (isset($_GET["id_agente"])){
|
|
|
|
$id_agente = $_GET["id_agente"];
|
|
|
|
}
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
// View last data packet
|
|
|
|
// Get timestamp of last packet
|
2009-03-26 16:55:30 +01:00
|
|
|
$agent = get_db_row ('tagente', 'id_agente', $id_agente,
|
|
|
|
array ('ultimo_contacto_remoto',
|
|
|
|
'ultimo_contacto',
|
|
|
|
'intervalo',
|
|
|
|
'id_grupo'));
|
|
|
|
$timestamp_ref = $agent["ultimo_contacto_remoto"];
|
|
|
|
$timestamp_lof = $agent["ultimo_contacto"];
|
|
|
|
$intervalo_agente = $agent["intervalo"];
|
2006-03-27 05:37:27 +02:00
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
// Get last packet
|
2009-03-26 16:55:30 +01:00
|
|
|
$sql3 = 'SELECT * FROM tagente_modulo, tagente_estado
|
|
|
|
WHERE tagente_modulo.disabled = 0
|
|
|
|
AND tagente_modulo.id_agente = ' . $id_agente.
|
|
|
|
' AND tagente_estado.utimestamp != 0
|
|
|
|
AND tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo
|
|
|
|
ORDER BY id_module_group, nombre';
|
2008-08-05 13:42:08 +02:00
|
|
|
$label_group = 0;
|
2008-06-19 02:24:05 +02:00
|
|
|
$last_label = "";
|
2008-08-05 13:42:08 +02:00
|
|
|
|
|
|
|
// Title
|
2009-04-13 Esteban Sanchez <estebans@artica.es>
* general/footer.php: Removed Firefox icon. Style correction.
* godmode/agentes/agent_manager.php: Replaced > with ». Style
correction when setting bold attributes.
* godmode/agentes/manage_config_remote.php,
godmode/agentes/modificar_agente.php, godmode/agentes/module_manager.php,
godmode/alerts/alert_list.php, godmode/db/db_audit.php,
godmode/db/db_event.php, godmode/db/db_info.php, godmode/db/db_main.php,
godmode/db/db_purge.php, godmode/db/db_refine.php,
godmode/groups/configure_group.php, godmode/groups/group_list.php,
godmode/modules/manage_nc_groups.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_network_templates.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/module_list.php, godmode/profiles/profile_list.php,
godmode/reporting/graph_builder.php, godmode/reporting/map_builder.php,
godmode/reporting/reporting_builder.php, godmode/servers/manage_export.php,
godmode/servers/manage_export_form.php,
godmode/servers/manage_recontask.php,
godmode/servers/manage_recontask_form.php,
godmode/servers/modificar_server.php, godmode/setup/setup_visuals.php,
godmode/setup/links.php, godmode/setup/news.php,
godmode/snmpconsole/snmp_alert.php, godmode/users/configure_user.php,
godmode/users/user_list.php, operation/agentes/alerts_status.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/estado_grupo.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/exportdata.php, operation/agentes/networkmap.php,
operation/agentes/status_monitor.php, operation/agentes/tactical.php,
operation/events/events.php, operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_statistics.php,
operation/messages/message.php, operation/reporting/custom_reporting.php,
operation/reporting/graph_viewer.php,
operation/reporting/reporting_viewer.php, operation/servers/view_server.php,
operation/users/user.php, operation/users/user_edit.php,
operation/users/user_statistics.php, operation/visual_console/index.php,
godmode/agentes/agent_template.php: Replaced > with »
* operation/agentes/datos_agente.php: Return instead of exit
* include/javascript/jquery.pandora.controls.js: Added pandoraSelectOS
control to preview the OS icon on a select.
* include/functions_reports.php: Fixed a bug on delete_report() that
returns error when the report has no content.
* include/functions_ui.php: Removed border attribute on print_os_icon().
Some fixes to meta refresh element on process_page_head(). Fixed
format_filesize() when length is zero.
* godmode/menu.php: Replaced link to file manager. Added enterprise hook.
* godmode/setup/file_manager.php: Renamed from obfuscated name filemgr.php
* include/styles/pandora.css: Textarea width reduced to 99%
* godmode/setup/setup.php: Added get_os_icon AJAX operation.
* images/mimetypes/, images/mimetypes/zip.png, images/mimetypes/image.png,
images/mimetypes/unknown.png, images/mimetypes/directory.png: Added to
repository. Mime type icons.
* extras/pandoradb_migrate_v2.x_to_v3.0.sql: Removed date comments.
* include/functions_filemanager.php: Added to repository. Minimal API for
file manager system.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1608 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-04-13 11:50:56 +02:00
|
|
|
echo "<h2>".__('Pandora Agents')." » ";
|
2008-08-12 Esteban Sanchez <estebans@artica.es>
* pandoradb_data.sql: Added default languages.
* include/streams.php, include/gettext.php: Added to repository. New
files to add gettext support of mo files.
* include/functions_db.php: Function lang_string() functionallity
changed to use gettext library.
* include/languages/language_es_es.php,
include/languages/language_gl.php, include/languages/language_en.php,
include/languages/language_pt_br.php,
include/languages/language_it.php,
include/languages/language_ast_es.php,
include/languages/language_es_la.php,
include/languages/language_de.php, include/languages/language_fr.php,
include/languages/language_ca.php: Files deleted, they are
deprecated since we have moved to gettext.
* lude/languages/pt_br.mo, include/languages/es.mo,
include/languages/fr.po, include/languages/it.po,
include/languages/ca.po, include/languages/ast.po,
include/languages/de.po, include/languages/gl.mo: Gettext translations
of the previous languages we have in language_*.php files.
* include/languages/Makefile: Added to repository to generate
index.pot and mo files of each translation.
* include/functions_reporting_pdf.php,
include/functions_reporting.php, include/config_process.php,
include/functions.php, include/functions_visual_map.php, index.php,
operation/incidents/incident.php,
operation/incidents/incident_detail.php,
operation/incidents/incident_note.php,
operation/incidents/incident_search.php,
operation/incidents/incident_statistics.php,
operation/snmpconsole/snmp_alert.php,
operation/snmpconsole/snmp_view.php, operation/users/user.php,
operation/users/user_edit.php, operation/users/user_statistics.php,
operation/events/event_statistics.php, operation/events/events.php,
operation/visual_console/render_view.php,
operation/visual_console/index.php,
operation/agentes/estado_alertas.php,
operation/agentes/status_monitor.php,
operation/agentes/estado_grupo.php,
operation/agentes/datos_agente.php,
operation/agentes/estado_ultimopaquete.php,
operation/agentes/estado_generalagente.php,
operation/agentes/estado_agente.php, operation/agentes/bulbs.php,
operation/agentes/sla_view.php, operation/agentes/exportdata.php,
operation/agentes/estado_monitores.php,
operation/agentes/ver_agente.php, operation/agentes/estadisticas.php,
operation/agentes/tactical.php, operation/agentes/networkmap.php,
operation/messages/message.php,
operation/reporting/reporting_viewer.php,
operation/reporting/graph_viewer.php,
operation/reporting/custom_reporting.php,
operation/servers/view_server.php,
operation/servers/view_server_detail.php, operation/menu.php,
reporting/fgraph.php, reporting/stat_win.php, general/logoff.php,
general/pandora_help.php, general/footer.php, general/noaccess.php,
general/logon_failed.php, general/links_menu.php,
general/login_page.php, general/logon_ok.php, general/header.php,
general/main_menu.php, godmode/groups/configure_group.php,
godmode/groups/group_list.php, godmode/setup/news.php,
godmode/setup/links.php, godmode/setup/setup.php,
godmode/users/user_list.php, godmode/users/configure_user.php,
godmode/profiles/profile_list.php, godmode/admin_access_logs.php,
godmode/db/db_info_data.php, godmode/db/db_main.php,
godmode/db/db_audit.php, godmode/db/db_refine.php,
godmode/db/db_info.php, godmode/db/db_event.php,
godmode/db/db_purge.php, godmode/agentes/agent_template.php,
godmode/agentes/module_manager_editor_network.php,
godmode/agentes/module_manager_editor_wmi.php,
godmode/agentes/alert_manager.php,
godmode/agentes/module_manager_editor_plugin.php,
godmode/agentes/module_manager_editor_prediction.php,
godmode/agentes/alert_manager_editor.php,
godmode/agentes/manage_config.php,
godmode/agentes/module_manager_editor_data.php,
godmode/agentes/module_manager.php,
godmode/agentes/modificar_agente.php,
godmode/agentes/configurar_agente.php,
godmode/agentes/agent_disk_conf_editor.php,
godmode/agentes/planned_downtime.php,
godmode/agentes/manage_config_remote.php,
godmode/agentes/agent_manager.php,
godmode/modules/manage_nc_groups_form.php,
godmode/modules/manage_network_templates.php,
godmode/modules/module_list.php,
godmode/modules/manage_network_templates_form.php,
godmode/modules/manage_network_components_form_network.php,
godmode/modules/manage_network_components_form_wmi.php,
godmode/modules/manage_network_components.php,
godmode/modules/manage_nc_groups.php,
godmode/reporting/reporting_builder.php,
godmode/reporting/map_builder.php,
godmode/reporting/graph_builder.php, godmode/servers/plugin.php,
godmode/servers/manage_recontask.php,
godmode/servers/modificar_server.php,
godmode/servers/manage_recontask_form.php,
godmode/alerts/modify_alert.php, godmode/alerts/configure_alert.php,
godmode/menu.php: Replaced string parameters of __() callings to
plain english. Style correction.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1006 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2008-08-12 14:06:25 +02:00
|
|
|
echo __('Display of last data modules received by agent');
|
2008-08-05 13:42:08 +02:00
|
|
|
echo " <a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data'><img src='images/refresh.png'></A>";
|
|
|
|
echo "</h2>";
|
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
$modules = get_db_all_rows_filter ('tagente_modulo, tagente_estado',
|
|
|
|
array ('tagente_modulo.id_agente_modulo = tagente_estado.id_agente_modulo',
|
|
|
|
'disabled' => 0,
|
|
|
|
'tagente_estado.utimestamp != 0',
|
|
|
|
'tagente_modulo.id_agente = '.$id_agente,
|
|
|
|
'order' => 'id_module_group, nombre'));
|
2008-08-05 13:42:08 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
if ($modules === false) {
|
|
|
|
echo "<div class='nf'>".__('This agent doesn\'t have any module')."</div>";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
echo "<table width='95%' cellpadding='3' cellspacing='3' class='databox'>";
|
|
|
|
echo "<th></th>";
|
|
|
|
echo "<th>".__('Module name')."</th>";
|
|
|
|
echo "<th>".__('Type')."</th>";
|
|
|
|
echo "<th>".__('int')."</th>";
|
|
|
|
echo "<th>".__('Description')."</th>";
|
|
|
|
echo "<th>".__('Data')."</th>";
|
|
|
|
echo "<th>".__('Graph')."</th>";
|
|
|
|
echo "<th>".__('Raw Data')."</th>";
|
|
|
|
echo "<th>".__('Timestamp')."</th>";
|
|
|
|
$texto=''; $last_modulegroup = 0;
|
|
|
|
$color = 1;
|
|
|
|
$write = give_acl ($config['id_user'], $agent['id_grupo'], "AW");
|
|
|
|
foreach ($modules as $module) {
|
|
|
|
// Calculate table line color
|
|
|
|
if ($color == 1){
|
|
|
|
$tdcolor = "datos";
|
|
|
|
$color = 0;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$tdcolor = "datos2";
|
|
|
|
$color = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($module["id_module_group"] != $last_modulegroup ){
|
|
|
|
// Render module group names (fixed code)
|
|
|
|
$nombre_grupomodulo = get_modulegroup_name ($module["id_module_group"]);
|
|
|
|
$last_modulegroup = $module["id_module_group"];
|
|
|
|
echo "<tr><td class='datos3' align='center' colspan='9'>
|
|
|
|
<b>".$nombre_grupomodulo."</b></td></tr>";
|
|
|
|
}
|
|
|
|
|
|
|
|
// Begin to render data ...
|
|
|
|
echo "<tr><td class='$tdcolor'>";
|
|
|
|
// Render network exec module button, only when
|
|
|
|
// Agent Write for this module and group, is given
|
|
|
|
// Is a network module
|
|
|
|
// Has flag = 0
|
|
|
|
if ($write && $module["id_modulo"] > 1 && $module["id_tipo_modulo"] < 100) {
|
|
|
|
if ($module["flag"] == 0) {
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$id_agente."&id_agente_modulo=".$module["id_agente_modulo"]."&flag=1&tab=data&refr=60'><img src='images/target.png' border='0'></a>";
|
|
|
|
} else {
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=".$id_agente."&id_agente_modulo=".$module["id_agente_modulo"]."&tab=data&refr=60'><img src='images/refresh.png' border='0'></a>";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
|
|
|
echo "</td>";
|
|
|
|
$nombre_grupomodulo = get_modulegroup_name ($module["id_module_group"]);
|
|
|
|
if ($nombre_grupomodulo != ""){
|
|
|
|
if (($label_group == 0) || ($last_label != $nombre_grupomodulo)){ // Show label module group
|
|
|
|
$label_group = -1;
|
|
|
|
$last_label = $nombre_grupomodulo;
|
|
|
|
$texto = $texto. "
|
|
|
|
<td class='$tdcolor' align='center' colspan='7'>
|
|
|
|
<b>".$nombre_grupomodulo."</b></td>";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
|
|
|
$nombre_tipo_modulo = get_moduletype_name ($module["id_tipo_modulo"]);
|
|
|
|
echo "<td class='".$tdcolor."_id' title='".salida_limpia($module["nombre"])."'>";
|
|
|
|
print_string_substr ($module["nombre"]);
|
|
|
|
echo "</td><td class='".$tdcolor."'> ";
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
print_moduletype_icon ($module["id_tipo_modulo"]);
|
|
|
|
echo "</td><td class='".$tdcolor."'>";
|
|
|
|
if ($module["module_interval"] != 0){
|
|
|
|
echo $module["module_interval"];
|
|
|
|
$real_interval = $module["module_interval"];
|
|
|
|
} else {
|
|
|
|
echo $intervalo_agente;
|
|
|
|
$real_interval = $intervalo_agente;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (($module["id_tipo_modulo"] != 3)
|
|
|
|
AND ($module["id_tipo_modulo"] != 10)
|
|
|
|
AND ($module["id_tipo_modulo"] != 17)
|
|
|
|
AND ($module["id_tipo_modulo"] != 23)){
|
|
|
|
echo "</td><td class='".$tdcolor."f9' title='".salida_limpia($module["descripcion"])."'>";
|
|
|
|
echo salida_limpia(substr($module["descripcion"],0,32));
|
|
|
|
if (strlen($module["descripcion"]) > 32){
|
|
|
|
echo "...";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
|
|
|
echo "</td>";
|
2009-03-26 16:55:30 +01:00
|
|
|
}
|
|
|
|
if (($module["id_tipo_modulo"] == 100) OR ($module['history_data'] == 0)) {
|
|
|
|
echo "<td class='".$tdcolor."f9' colspan='2' title='".$module["datos"]."'>";
|
|
|
|
echo substr(salida_limpia($module["datos"]),0,12);
|
|
|
|
} else {
|
|
|
|
// String uses colspan2 and different graphtype
|
|
|
|
if (($module["id_tipo_modulo"] == 3)
|
|
|
|
OR ($module["id_tipo_modulo"] == 10)
|
|
|
|
OR ($module["id_tipo_modulo"] == 17)
|
|
|
|
OR ($module["id_tipo_modulo"] == 23)){
|
|
|
|
$graph_type = "string";
|
|
|
|
echo "<td class='".$tdcolor."f9' colspan=2 title='".salida_limpia($module["datos"])."'>";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
elseif (($module["id_tipo_modulo"] == 2)
|
|
|
|
OR ($module["id_tipo_modulo"] == 6)
|
|
|
|
OR ($module["id_tipo_modulo"] == 21)
|
|
|
|
OR ($module["id_tipo_modulo"] == 18)
|
|
|
|
OR ($module["id_tipo_modulo"] == 9)) {
|
|
|
|
$graph_type = "boolean";
|
|
|
|
echo "<td class=".$tdcolor.">";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$graph_type = "sparse";
|
|
|
|
echo "<td class=".$tdcolor.">";
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
// Kind of data
|
|
|
|
if (is_numeric($module["datos"])) {
|
|
|
|
echo format_for_graph($module["datos"] );
|
|
|
|
} else
|
|
|
|
echo substr(salida_limpia($module["datos"]),0,42);
|
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
$handle = "stat".$nombre_tipo_modulo."_".$module["id_agente_modulo"];
|
|
|
|
$url = 'reporting/procesos.php?agente='.$module["id_agente_modulo"];
|
|
|
|
$win_handle=dechex(crc32($module["id_agente_modulo"].$module["nombre"]));
|
|
|
|
echo "<td class=".$tdcolor." width='78'>";
|
|
|
|
$graph_label = output_clean_strict ($module["nombre"]);
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
echo "<a href='javascript:winopeng(\"reporting/stat_win.php?type=$graph_type&period=2419200&id=".$module["id_agente_modulo"]."&label=".$graph_label."refresh=180000\", \"month_".$win_handle."\")'><img src='images/grafica_m.png' border=0></a> ";
|
2009-01-12 Sancho Lerena <slerena@artica.es>
* pandoradb.sql: Removed fields "timestamp" and "id_agente" (and altered
some indexes) on tagente_datos, tagente_datos_string and
tagente_datos_inc.
tagente_estado table: removed cambio, added status_changes, last_status.
tagente_modulo: added five new fields (warning,critical mgmt., flipflop
detection, history module and delete_pending bit.
* agent_manager.php: Group ALL not shown anymore.
* configurar_agente.php: Support for new options. Delete a module now
mark for deletion the module, not delete data (It's VERY slow!).
* modificar_agente.php: Delete agent now uses the global function,
minor fixes.
* module_manager_editor.php: New fields initializacion.
* module_manager_editor_network.php: At this time, the first module
editor who implements the new fields and improve old ones (tcp data).
* setup.php: Added support for new token: event_view_hr (Filter of max
old (in hr) for the event viewer. Removed old tokens show_unknown and
show_lastalert.
* functions.php: format_for_graph() has an important BUG that makes
all units rendered without the "K" !!!!. Fixed.
* delete_agent.php: Delete remote config (if present). Also mark
for deletion modules instead delete them (and let the data without
being deleted, because it's a HUGE consuming time, and it's left
for the daily db maintance process).
* estado_agente.php: Updated code for view new status.
* estado_generalagente.php: Total packets are removed from this view,
this was a huge time consuming SQL operation that don't give important
infomation. Groupname is now visualized.
* estado_ultimopaquete.php,
* estado_monitores.php,
* estado_grupo.php: Rewritten much code to view new status and other
minor changes.
* ver_agente.php: Data view now works under the tabs and other minor
changes.
* events.php: Support for the new events and status. Added filter for
username and for a max. hours old events. Some boxes are now hidden
by default.
* fgraph.php: Some graphs are now fixed and uses tagente_datos and
tagent_access with utimestamp and without id_agent index. Works faster
* images/*: Updated icons (module types) and two new bulb colors.
git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1326 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
2009-01-12 04:53:33 +01:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
$link ="winopeng('reporting/stat_win.php?type=$graph_type&period=604800&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=6000','week_".$win_handle."')";
|
|
|
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_w.png" border=0></a> ';
|
|
|
|
|
|
|
|
$link ="winopeng('reporting/stat_win.php?type=$graph_type&period=86400&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=600','day_".$win_handle."')";
|
|
|
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_d.png" border=0></a> ';
|
|
|
|
|
|
|
|
$link ="winopeng('reporting/stat_win.php?type=$graph_type&period=3600&id=".$module["id_agente_modulo"]."&label=".$graph_label."&refresh=60','hour_".$win_handle."')";
|
|
|
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_h.png" border=0></a>';
|
|
|
|
}
|
|
|
|
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2009-03-26 16:55:30 +01:00
|
|
|
if ($module['history_data'] == 1){
|
|
|
|
// RAW Table data
|
|
|
|
echo "<td class=".$tdcolor." width=70>";
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=2592000&id=".$module["id_agente_modulo"]."'><img border=0 src='images/data_m.png'></a> ";
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=604800&id=".$module["id_agente_modulo"]."'><img border=0 src='images/data_w.png'></a> ";
|
|
|
|
echo "<a href='index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=$id_agente&tab=data_view&period=86400&id=".$module["id_agente_modulo"]."'><img border=0 src='images/data_d.png'></a>";
|
|
|
|
} else {
|
|
|
|
echo "<td class=".$tdcolor."></td>";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
echo "<td class='".$tdcolor."f9'>";
|
|
|
|
if ($module["timestamp"] == "0000-00-00 00:00:00"){
|
|
|
|
echo __('Never');
|
|
|
|
} else {
|
|
|
|
$ahora = get_system_time ();
|
|
|
|
// Async modules
|
|
|
|
if (($module["id_tipo_modulo"] > 20) AND ($module["id_tipo_modulo"] < 100)){
|
|
|
|
echo human_time_comparation($module["timestamp"]);
|
2008-06-19 02:24:05 +02:00
|
|
|
} else {
|
2009-03-26 16:55:30 +01:00
|
|
|
if ( ($ahora - $module["utimestamp"]) > ($real_interval*2)) {
|
|
|
|
echo "<font color='red'>";
|
|
|
|
echo human_time_comparation($module["timestamp"]);
|
|
|
|
echo "</font>";
|
|
|
|
} else
|
|
|
|
echo human_time_comparation($module["timestamp"]);
|
2008-06-19 02:24:05 +02:00
|
|
|
}
|
2009-01-20 17:43:49 +01:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
echo "</td></tr>";
|
2006-03-27 05:37:27 +02:00
|
|
|
}
|
2009-03-26 16:55:30 +01:00
|
|
|
echo '</table>';
|
2008-06-19 02:24:05 +02:00
|
|
|
|
2006-07-09 01:32:38 +02:00
|
|
|
?>
|