'. __('Source group'). '
';
$groups = get_user_groups ($config['id_user']);
print_select ($groups, "id_group", $id_group, 'javascript:this.form.submit();', '', 0, false, false, false, '" style="width:200px');
echo '
';
// Source agent
echo ''. __('Source agent').'
';
// Show combo with SOURCE agents
if ($id_group > 1) { //Group -1, 0 and 1 all mean that we should select ALL
$result = get_db_all_rows_field_filter ("tagente", "id_grupo", $id_group, "nombre");
} else {
$result = get_db_all_rows_in_table ("tagente", "nombre");
}
if ($result === false) {
$result = array ();
$result[0]["id_grupo"] = 0;
$result[0]["id_agente"] = 0;
$result[0]["nombre"] = __('No Agents in this Group');
}
$agents = array ();
foreach ($result as $row) {
if (give_acl ($config["id_user"], $row["id_grupo"], "AR"))
$agents[$row["id_agente"]] = $row["nombre"];
}
if ($origen == -1 || ($id_group > 1 && dame_id_grupo ($origen) != $id_group)) {
$origen = $result[0]["id_agente"];
//If the agent selected is not in the group selected (that
//happens if an agent was selected and then the group was changed)
}
print_select ($agents, "origen", $origen, 'javascript:this.form.submit();', '', 0, false, false, false, '" style="width:200px');
echo '
';
// Source Module(s)
$result = get_db_all_rows_field_filter ("tagente_modulo", "id_agente", $origen, "nombre");
$modules = array ();
if ($result === false) {
$result = array ();
$result[0]["id_agente_modulo"] = -1;
if ($origen > 0) {
$result[0]["nombre"] = __('No modules for this agent');
} else {
$result[0]["nombre"] = __('No agent selected');
}
}
foreach ($result as $row) {
$modules[$row["id_agente_modulo"]] = $row["nombre"];
}
echo ''.__('Modules').'
';
print_select ($modules, "origen_modulo[]", '', '', '', 0, false, true, false, '" style="width:250px');
echo ' | ';
echo '';
echo ''.__('Targets'). '';
pandora_help ('manageconfig');
echo '
';
echo '';
echo ''.__('Modules').' | ';
print_checkbox_extended ("modules", "1", false, false, '', 'class="chk"');
echo ' | '.__('Alerts').' | ';
print_checkbox_extended ("alerts", "1", false, false, '', 'class="chk"');
echo ' | |
';
// Destination agent
$result = get_db_all_rows_in_table ("tagente", "nombre");
$agents = array ();
if ($result === false) {
$result = array ();
}
foreach ($result as $row) {
if (give_acl ($config["id_user"], $row["id_grupo"], "AW"))
$agents[$row["id_agente"]] = $row["nombre"];
}
echo '';
echo ''.__('To Agent(s):').'
';
print_select ($agents, "destino[]", $destino, '', '', 0, false, true, false, '" style="width:250px');
echo ' | ';
// Form buttons
echo '';
echo "
";
print_submit_button (__('Copy Modules/Alerts'), "copy", false, 'class="sub copy" onClick="if (!confirm("'.__('Are you sure?').'")) return false;"');
pandora_help ('manageconfig');
echo "
";
print_submit_button (__('Delete Modules/Alerts'), "delete", false, 'class="sub delete" onClick="if (!confirm("'.__('Are you sure you want to delete these modules and alerts?').'")) return false;"');
pandora_help ('manageconfig');
echo "
";
print_submit_button (__('Delete Agents'), "delete_agent", false, 'class="sub delete" onClick="if (!confirm("'.__('Are you sure you want to delete these agents?').'")) return false;"');
pandora_help ('manageconfig');
echo ' |
';
echo '