".__('Data Copy').""; // Initial checkings // if selected more than 0 agents $destino = $_POST["destino"]; if (count($destino) <= 0){ echo "

ERROR: ".__('No selected agents to copy')."

"; echo ""; include ("general/footer.php"); exit; } // Source $id_origen = get_parameter ("origen"); // Security check here if (!user_access_to_agent ($id_origen)) { audit_db ($config['id_user'], $REMOTE_ADDR, "ACL Violation", "Trying to forge a source agent in remote config tool"); require ("general/noaccess.php"); exit; } // Copy files for ($a=0;$a
".__('Making copy of configuration file for')." [".$agent_name_src."] ".__('to')." [".$agent_name_dst."]"; $source = $config["remote_config"]."/".md5($agent_name_src); $destination = $config["remote_config"]."/".md5($agent_name_dst); copy ( $source.".md5", $destination.".md5" ); copy ( $source.".conf", $destination.".conf" ); } // for each destination agent } //end if copy modules or alerts // ============ // Form view // ============ } else { // title echo '

'.__('Agent configuration'). ' » '. __('Remote configuration management').'

'; echo '
'; echo ""; // Source group echo ''; echo '
'. __('Source group'). '

'; $group_select = get_user_groups ($config['id_user']); $grouplist = implode (',', array_keys ($group_select)); echo print_select ($group_select, 'id_group', $id_group, '', '', '', true); echo '  '; echo ''; echo '

'; // Source agent echo ''. __('Source agent').''; print_help_icon ('duplicateconfig'); echo '

'; // Show combo with SOURCE agents if ($id_group > 1) $sql1 = "SELECT * FROM tagente WHERE id_grupo = $id_group ORDER BY nombre "; else $sql1 = "SELECT * FROM tagente WHERE id_group IN ($grouplist) ORDER BY nombre"; echo ''; // Destination agent echo '
'; echo ''.__('To Agent(s):').'

'; echo "'; // Form buttons echo '
'; echo ''; echo '
'; echo '
'; } ?>