**
$chunks = explode('**', reset(array_keys($ops)));
$first_op = explode('_', $chunks[1]);
if (isset($first_op[1]) && $first_op[1] == 'avg') {
$is_synthetic_avg = true;
}
else {
$is_synthetic = true;
}
$custom_integer_1 = 0;
$custom_integer_2 = 0;
break;
case MODULE_PREDICTION_NETFLOW:
$is_netflow = true;
$custom_integer_2 = 0;
break;
default:
$prediction_module = $custom_integer_1;
break;
}
}
else {
$custom_integer_1 = 0;
}
if (strstr($page, "policy_modules") === false) {
if ($config['enterprise_installed'])
$disabledBecauseInPolicy = policies_is_module_in_policy($id_agent_module) && policies_is_module_linked($id_agent_module);
else
$disabledBecauseInPolicy = false;
if ($disabledBecauseInPolicy)
$disabledTextBecauseInPolicy = 'disabled = "disabled"';
}
$extra_title = __('Prediction server module');
$data = array ();
$data[0] = __('Source module');
$data[0] .= ui_print_help_icon ('prediction_source_module', true);
$data[1] = '';
// Services and Synthetic are an Enterprise feature.
$module_service_synthetic_selector = enterprise_hook('get_module_service_synthetic_selector', array($is_service, $is_synthetic, $is_synthetic_avg, $is_netflow));
if ($module_service_synthetic_selector !== ENTERPRISE_NOT_HOOK) {
$data[1] = $module_service_synthetic_selector;
$table_simple->colspan['module_service_synthetic_selector'][1] = 3;
push_table_simple ($data, 'module_service_synthetic_selector');
$data = array();
$data[0] = '';
}
$data[1] = '
';
$data[1] .= html_print_label(__("Agent"),'agent_name', true)."
";
$params = array();
$params['return'] = true;
$params['show_helptip'] = true;
$params['input_name'] = 'agent_name';
$params['value'] = $agent_name;
$params['javascript_is_function_select'] = true;
$params['selectbox_id'] = 'prediction_module';
$params['none_module_text'] = __('Select Module');
$params['use_hidden_input_idagent'] = true;
$params['hidden_input_idagent_id'] = 'hidden-id_agente';
$data[1] .= ui_print_agent_autocomplete_input($params);
// Get module and agent of the target prediction module
if (!empty($prediction_module)) {
$id_agente_clean = modules_get_agentmodule_agent($prediction_module);
$prediction_module_agent = modules_get_agentmodule_agent_name($prediction_module);
$agent_name_clean = $prediction_module_agent;
}
else {
$id_agente_clean = $id_agente;
$agent_name_clean = $agent_name;
}
$data[1] .= html_print_label(__("Module"),'prediction_module',true);
if ($id_agente) {
$sql = "SELECT id_agente_modulo, nombre
FROM tagente_modulo
WHERE delete_pending = 0
AND history_data = 1
AND id_agente = " . $id_agente_clean . "
AND id_agente_modulo <> " . $id_agente_modulo;
$data[1] .= html_print_select_from_sql($sql, 'prediction_module',
$prediction_module, false, __('Select Module'), 0, true);
}
else {
$data[1] .= '';
}
$data[1] .= html_print_label(__("Period"), 'custom_integer_2', true)."
";
$periods [0] = __('Weekly');
$periods [1] = __('Monthly');
$periods [2] = __('Daily');
$data[1] .= html_print_select ($periods, 'custom_integer_2', $custom_integer_2, '', '', 0, true);
$data[1] .= html_print_input_hidden ('id_agente', $id_agente, true);
$data[1] .= '
';
$table_simple->colspan['prediction_module'][1] = 3;
push_table_simple ($data, 'prediction_module');
// Services are an Enterprise feature.
$selector_form = enterprise_hook('get_selector_form', array($custom_integer_1));
if ($selector_form !== ENTERPRISE_NOT_HOOK) {
$data = array();
$data[0] = '';
$data[1] = $selector_form;
$table_simple->colspan['service_module'][1] = 3;
push_table_simple ($data, 'service_module');
}
// Synthetic modules are an Enterprise feature.
$synthetic_module_form = enterprise_hook ('get_synthetic_module_form');
if ($synthetic_module_form !== ENTERPRISE_NOT_HOOK) {
$data = array();
$data[0] = '';
$data[1] = $synthetic_module_form;
$table_simple->colspan['synthetic_module'][1] = 3;
push_table_simple ($data, 'synthetic_module');
}
// Netflow modules are an Enterprise feature.
$netflow_module_form = enterprise_hook ('get_netflow_module_form', array($custom_integer_1));
if ($netflow_module_form !== ENTERPRISE_NOT_HOOK) {
$data = array();
$data[0] = '';
$data[1] = $netflow_module_form;
$table_simple->colspan['netflow_module_form'][1] = 3;
push_table_simple ($data, 'netflow_module');
}
/* Removed common useless parameter */
unset ($table_advanced->data[3]);
?>