class = 'databox'; $table->width = '98%'; $table->data = array (); $table->style = array (); $table->style[0] = 'font-weight: bold; vertical-align:top'; $table->style[2] = 'font-weight: bold'; $table->size = array (); $table->size[0] = '10%'; $table->size[1] = '30%'; $table->size[2] = '10%'; $table->size[3] = '10%'; $table->size[4] = '10%'; $table->size[5] = '30%'; /* Source selection */ $table->id = 'source_table'; $table->data[0][0] = __('Group'); $table->data[0][1] = html_print_select_groups(false, "AR", true, 'source_id_group', $source_id_group, false, '', '', true); $table->data[0][2] = __('Group recursion'); $table->data[0][3] = html_print_checkbox ("source_recursion", 1, $source_recursion, true, false); $table->data[0][4] = __('Agent'); $table->data[0][4] .= ' '; $table->data[0][5] = html_print_select (agents_get_group_agents ($source_id_group, false, "none"), 'source_id_agent', $source_id_agent, false, __('Select'), 0, true); echo '
'; echo '
'; echo ''.__('Source'); ui_print_help_icon ('manageconfig'); echo ''; html_print_table ($table); echo '
'; /* Target selection */ $table->id = 'target_table'; $table->data = array (); $modules = array (); if ($source_id_agent) $modules = agents_get_modules ($source_id_agent, 'nombre'); $table->data['operations'][0] = __('Operations'); $table->data['operations'][1] = ''; $table->data['operations'][1] .= html_print_checkbox ('copy_modules', 1, true, true); $table->data['operations'][1] .= html_print_label (__('Copy modules'), 'checkbox-copy_modules', true); $table->data['operations'][1] .= '
'; $table->data['operations'][1] .= ''; $table->data['operations'][1] .= html_print_checkbox ('copy_alerts', 1, true, true); $table->data['operations'][1] .= html_print_label (__('Copy alerts'), 'checkbox-copy_alerts', true); $table->data['operations'][1] .= ''; $table->data[1][0] = __('Modules'); $table->data[1][1] = ''; $table->data[1][1] .= html_print_select ($modules, 'target_modules[]', 0, false, '', '', true, true); $table->data[1][1] .= ''; $table->data[1][1] .= ''; $table->data[1][1] .= ''.__('No modules for this agent').''; $table->data[1][1] .= ''; $table->data[2][0] = __('Alerts'); $agent_alerts = array (); if ($source_id_agent) $agent_alerts = agents_get_alerts_simple ($source_id_agent); $alerts = array (); foreach ($agent_alerts as $alert) { $name = alerts_get_alert_template_name ($alert['id_alert_template']); $name .= ' ('.$modules[$alert['id_agent_module']].')'; $alerts[$alert['id']] = $name; } $table->data[2][1] = ''; $table->data[2][1] .= html_print_select ($alerts, 'target_alerts[]', 0, false, '', '', true, true); $table->data[2][1] .= ''; $table->data[2][1] .= ''; $table->data[2][1] .= ''.__('No alerts for this agent').''; $table->data[2][1] .= ''; echo ''; echo ''; /* Destiny selection */ $table->id = 'destiny_table'; $table->data = array (); $table->size[0] = '20%'; $table->size[1] = '30%'; $table->size[2] = '20%'; $table->size[3] = '30%'; $table->data[0][0] = __('Group'); $table->data[0][1] = html_print_select ($groups, 'destiny_id_group', $destiny_id_group, false, '', '', true); $table->data[0][2] = __('Group recursion'); $table->data[0][3] = html_print_checkbox ("destiny_recursion", 1, $destiny_recursion, true, false); $table->data[1][0] = __('Agent'); $table->data[1][0] .= ''; $table->data[1][1] = html_print_select (agents_get_group_agents ($destiny_id_group, false, "none"), 'destiny_id_agent[]', 0, false, '', '', true, true); echo ''; echo '
'; html_print_input_hidden ('do_operation', 1); html_print_submit_button (__('Copy'), 'go', false, 'class="sub wand"'); echo '
'; echo '
'; echo ''; ui_require_jquery_file ('form'); ui_require_jquery_file ('pandora.controls'); ?>