width = 750; $table->cellpadding = 4; $table->cellspacing = 4; $table->class = "databox"; $table->head = array (); $table->data = array (); $table->head[0] = ''; $table->head[1] = __('Type'); $table->head[2] = __('Module name'); $table->head[3] = __('Description'); $table->head[4] = __('Status'); $table->head[5] = __('Interval'); $table->head[6] = __('Last contact'); $table->align = array("left","left","left","left","center"); foreach ($modules as $module) { $data = array (); if (($module["id_modulo"] != 1) && ($module["id_tipo_modulo"] != 100)) { if ($module["flag"] == 0) { $data[0] = ''; } else { $data[0] = ''; } } else { $data[0] = ''; } $data[1] = show_server_type ($module['id_modulo']); //$data[1] .= ' '; if (give_acl ($config['id_user'], $id_grupo, "AW")) $data[1] .= ' '; $data[2] = substr ($module["nombre"], 0, 25); $data[3] = substr ($module["descripcion"], 0, 35); $status = STATUS_MODULE_WARNING; $title = ""; if ($module["estado"] == 2) { $status = STATUS_MODULE_WARNING; $title = __('WARNING'); } elseif ($module["estado"] == 1) { $status = STATUS_MODULE_CRITICAL; $title = __('CRITICAL'); } else { $status = STATUS_MODULE_OK; $title = __('NORMAL'); } if (is_numeric($module["datos"])) { $title .= " : " . format_for_graph($module["datos"]); } else { $title .= " : " . substr(salida_limpia($module["datos"]),0,42); } $data[4] = print_status_image($status, $title, true); if ($module["module_interval"] > 0) { $data[5] = $module["module_interval"]; } else { $data[5] = "--"; } $seconds = get_system_time () - $module["utimestamp"]; if ($module['id_tipo_modulo'] < 21 && $module["module_interval"] > 0 && $module["utimestamp"] > 0 && $seconds >= ($module["module_interval"] * 2)) { $data[6] = ''; } else { $data[6] = ''; } $data[6] .= print_timestamp ($module["utimestamp"], true); $data[6] .= ''; array_push ($table->data, $data); } if (empty ($table->data)) { echo '
'.__('This agent doesn\'t have any active monitors').'
'; } else { echo "

".__('Full list of Monitors')."

"; print_table ($table); } unset ($table); unset ($table_data); ?>