class = 'databox'; $table->width = '95%'; $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] = '15%'; $table->size[1] = '35%'; $table->size[2] = '15%'; $table->size[3] = '35%'; /* 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] = __('Agent'); $table->data[0][2] .= ' '; $table->data[0][3] = html_print_select (agents_get_group_agents ($source_id_group, false, "none"), 'source_id_agent', $source_id_agent, false, __('Select'), 0, true); //$table->data[0][3] = html_print_input_text_extended ('id_agent', __('Select'), 'text-id_agent', '', 25, 100, false, '', // array('style' => 'background: url(images/lightning.png) no-repeat right;'), true) // . ' ' . __("Type two chars at least for search") . ''; 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->data[0][0] = __('Group'); $table->data[0][1] = html_print_select ($groups, 'destiny_id_group', $destiny_id_group, false, '', '', true); $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'); ?>