mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-26 11:29:12 +02:00
* include/functions_graph.php, include/functions_reporting.php, operation/incidents/incident_statistics.php, operation/agentes/custom_fields.php, operation/agentes/agent_fields.php, operation/servers/view_server_detail.php, operation/integria_incidents/incident_statistics.php, operation/events/event_statistics.php, operation/events/events_list.php, operation/events/events.php, operation/reporting/reporting_xml.php, godmode/admin_access_logs.php, godmode/db/db_main.php, godmode/db/db_info.php, godmode/db/db_purge.php, godmode/reporting/graph_builder.main.php, godmode/reporting/visual_console_builder.editor.js, godmode/reporting/graph_builder.php, godmode/reporting/graph_builder.graph_editor.php, godmode/reporting/graph_builder.preview.php: changed for to use new engine. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
80 lines
2.2 KiB
PHP
80 lines
2.2 KiB
PHP
<?php
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
// ==================================================
|
|
// Copyright (c) 2005-2010 Artica Soluciones Tecnologicas
|
|
// Please see http://pandorafms.org for full contribution list
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
// Load global vars
|
|
global $config;
|
|
|
|
require_once ("include/functions_agents.php");
|
|
|
|
check_login ();
|
|
|
|
$id_agente = get_parameter_get ("id_agente", -1);
|
|
|
|
if ($id_agente === -1) {
|
|
echo '<h3 class="error">'.__('There was a problem loading agent').'</h3>';
|
|
return;
|
|
}
|
|
|
|
if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR")) {
|
|
pandora_audit("ACL Violation",
|
|
"Trying to access Agent General Information");
|
|
require_once ("general/noaccess.php");
|
|
return;
|
|
}
|
|
|
|
|
|
$fields = get_db_all_fields_in_table('tagent_custom_fields');
|
|
|
|
if($fields === false) {
|
|
$fields = array();
|
|
echo "<div class='nf'>". __("No fields defined"). "</div>";
|
|
} else {
|
|
$table->width = '65%';
|
|
$table->head = array ();
|
|
$table->head[0] = __('Field');
|
|
$table->head[1] = __('Display on front') . ui_print_help_tip (__('The fields with display on front enabled will be displayed into the agent details'), true);
|
|
$table->head[2] = __('Description');
|
|
$table->align = array ();
|
|
$table->align[1] = 'center';
|
|
$table->align[2] = 'center';
|
|
$table->data = array ();
|
|
|
|
foreach ($fields as $field) {
|
|
|
|
$data[0] = '<b>'.$field['name'].'</b>';
|
|
|
|
if($field['display_on_front']) {
|
|
$data[1] = print_image('images/tick.png', true);
|
|
}else {
|
|
$data[1] = print_image('images/delete.png', true);
|
|
}
|
|
|
|
$custom_value = get_db_value_filter('description', 'tagent_custom_data', array('id_field' => $field['id_field'], 'id_agent' => $id_agente));
|
|
|
|
if($custom_value === false || $custom_value == '') {
|
|
$custom_value = '<i>-'.__('empty').'-</i>';
|
|
}
|
|
|
|
$data[2] = $custom_value;
|
|
|
|
array_push ($table->data, $data);
|
|
}
|
|
|
|
print_table ($table);
|
|
}
|
|
?>
|