ERROR: ".__('No selected agents to copy').""; echo ""; include ("general/footer.php"); exit; } // Source $id_origen = get_parameter ("origen"); // Security check here if (!users_access_to_agent ($id_origen)) { db_pandora_audit("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."]"; $agent_md5_src = md5($agent_name_src); $agent_md5_dst = md5($agent_name_dst); copy ( $config["remote_config"]."/md5/".$agent_md5_src.".md5", $config["remote_config"]."/md5/".$agent_md5_dst.".md5" ); copy ( $config["remote_config"]."/conf/".$agent_md5_src.".conf", $config["remote_config"]."/conf/".$agent_md5_dst.".conf" ); } // for each destination agent } //end if copy modules or alerts // ============ // Form view // ============ } else { // title // Header ui_print_page_header (__("Remote configuration management"), "images/god1.png", false, "", true, ""); echo '
'; echo ""; // Source group echo ''; // Destination agent echo ''; // Form buttons echo ''; echo '
'. __('Source group'). '

'; $group_select = users_get_groups ($config['id_user']); $grouplist = implode (',', array_keys ($group_select)); echo html_print_select_groups($config['id_user'], "AR", true, 'id_group', $id_group, '', '', '', true); echo '  '; echo ''; echo '

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

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

'; echo "'; echo '
'; echo ''; echo '
'; } ?>