From 5277e8928b8c71cbd960bdd0885de276c72b378b Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 4 Feb 2013 12:36:50 +0000 Subject: [PATCH] 2013-02-04 Miguel de Dios * operation/search_modules.php: added edit button when the user can edit. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7568 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 ++++ pandora_console/operation/search_modules.php | 24 ++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3c1270fcdc..173f86e1a5 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-02-04 Miguel de Dios + + * operation/search_modules.php: added edit button when the user can + edit. + 2013-02-04 Miguel de Dios * install.php: cleaned source code style. diff --git a/pandora_console/operation/search_modules.php b/pandora_console/operation/search_modules.php index 175503caf3..35ce282ad9 100644 --- a/pandora_console/operation/search_modules.php +++ b/pandora_console/operation/search_modules.php @@ -179,6 +179,7 @@ else { $table->head[5] = __('Graph'); $table->head[6] = __('Data'); $table->head[7] = __('Timestamp'); + $table->head[8] = ""; @@ -191,6 +192,7 @@ else { $table->align[5] = "center"; $table->align[6] = "right"; $table->align[7] = "right"; + $table->align[8] = "center"; $table->data = array (); @@ -252,7 +254,7 @@ else { if (is_numeric($module["datos"])) $dataCell = format_numeric($module["datos"]); else - $dataCell = "".substr(io_safe_output($module["datos"]),0,12).""; + $dataCell = "".substr(io_safe_output($module["datos"]),0,12).""; if ($module['estado'] == 3) { $option = array ("html_attr" => 'class="redb"'); @@ -263,6 +265,23 @@ else { $timestampCell = ui_print_timestamp ($module["utimestamp"], true, $option); + $group_agent = agents_get_agent_group($module['id_agente']); + + if (check_acl ($config['id_user'], $group_agent, "AW")) { + $edit_module = 'aaa'; + + $url_edit = "index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&id_agente=" + . $module['id_agente'] . "&tab=module&id_agent_module=" . + $module["id_agente_modulo"] . "&edit_module=1"; + + $edit_module = '' . + html_print_image("images/config.png") . ''; + } + else { + $edit_module = ''; + } + + array_push($table->data, array( $module['module_name'], $agentCell, @@ -271,7 +290,8 @@ else { $statusCell, $graphCell, $dataCell, - $timestampCell)); + $timestampCell, + $edit_module)); } echo "
";