";
- echo "";
- // $attr = array('id' => 'image-select_all_available', 'title' => __('Select all'), 'style' => 'cursor: pointer;');
- echo "" . __('Common in agents')." " . html_print_image ('images/tick.png', true, $attr, false, true);
- echo " | ";
-
- echo "";
- echo " | ";
-
- echo "";
- // $attr = array('id' => 'image-select_all_apply', 'title' => __('Select all'), 'style' => 'cursor: pointer;');
- echo "" . __('Added common modules')." " . html_print_image ('images/tick.png', true, $attr, false, true);
- echo " | ";
- echo "
";
- echo "";
-
-
- $cluster_agents_in_id = agents_get_cluster_agents_id($id_cluster);
-
- $serialize_agents = '';
-
- foreach ($cluster_agents_in_id as $value) {
-
- if ($value === end($cluster_agents_in_id)) {
- $serialize_agents .= $value;
- }
- else{
- $serialize_agents .= $value.',';
- }
-
- }
- $cluster_modules_in = items_get_cluster_items_name($id_cluster);
-
- $cluster_modules_all = db_get_all_rows_sql('select count(nombre) as total ,nombre, id_agente_modulo,id_agente FROM
- tagente_modulo where id_agente in ('.$serialize_agents.') group by nombre having total = '.count($cluster_agents_in_id));
-
- foreach ($cluster_modules_all as $key => $value) {
- $cluster_modules_all_name[$value['nombre']] = $value['nombre'];
- }
-
- $cluster_modules_all_diff = array_diff($cluster_modules_all_name,$cluster_modules_in);
-
- html_print_select ($cluster_modules_all_diff, 'name_modules[]', 0, false, '', '', false, true, true, '', false, 'width: 100%;', $option_style);
-
- echo " | ";
-
- echo "";
- echo " ";
- html_print_image ('images/darrowright.png', false, array ('id' => 'module_right', 'title' => __('Add modules to cluster')));
- echo "
";
- html_print_image ('images/darrowleft.png', false, array ('id' => 'module_left', 'title' => __('Drop modules to cluster')));
- echo "
";
- echo " | ";
-
- echo "";
-
- html_print_select ($cluster_modules_in, 'name_modules2[]', 0, false, '', '', false, true, true, '', false, 'width: 100%;', $option_style);
-
- echo " | ";
- echo "
";
- echo "