__('Bulk alert add'), 'delete_alerts' => __('Bulk alert delete'), 'add_action_alerts' => __('Bulk alert actions add'), 'delete_action_alerts' => __('Bulk alert actions delete'), 'enable_disable_alerts' => __('Bulk alert enable/disable'), 'standby_alerts' => __('Bulk alert setting standby')); $options_agents = array( 'edit_agents' => __('Bulk agent edit'), 'delete_agents' => __('Bulk agent delete')); if (check_acl ($config['id_user'], 0, "PM")) { $options_users = array( 'add_profiles' => __('Bulk profile add'), 'delete_profiles' => __('Bulk profile delete')); } else { $options_users = array(); } $options_modules = array( 'delete_modules' => __('Bulk module delete'), 'edit_modules' => __('Bulk module edit'), 'copy_modules' => __('Bulk module copy')); $options_plugins = array( 'edit_plugins' => __('Bulk plugin edit') ); if (! check_acl ($config['id_user'], 0, "PM")) { unset($options_modules['edit_modules']); } $options_policies = array(); $policies_options = enterprise_hook('massive_policies_options'); if ($policies_options != ENTERPRISE_NOT_HOOK) { $options_policies = array_merge($options_policies, $policies_options); } $options_snmp = array(); $snmp_options = enterprise_hook('massive_snmp_options'); if ($snmp_options != ENTERPRISE_NOT_HOOK) { $options_snmp = array_merge($options_snmp, $snmp_options); } $options_satellite = array(); $satellite_options = enterprise_hook('massive_satellite_options'); if ($satellite_options != ENTERPRISE_NOT_HOOK) { $options_satellite = array_merge($options_satellite, $satellite_options); } if (in_array($option, array_keys($options_alerts))) { $tab = 'massive_alerts'; } elseif (in_array($option, array_keys($options_agents))) { $tab = 'massive_agents'; } elseif (in_array($option, array_keys($options_users))) { $tab = 'massive_users'; } elseif (in_array($option, array_keys($options_modules))) { $tab = 'massive_modules'; } elseif (in_array($option, array_keys($options_policies))) { $tab = 'massive_policies'; } elseif (in_array($option, array_keys($options_snmp))) { $tab = 'massive_snmp'; } elseif (in_array($option, array_keys($options_satellite))) { $tab = 'massive_satellite'; } elseif (in_array($option, array_keys($options_plugins))) { $tab = 'massive_plugins'; } else { $option = ''; } switch ($tab) { case 'massive_alerts': $options = $options_alerts; break; case 'massive_agents': $options = $options_agents; break; case 'massive_modules': $options = $options_modules; break; case 'massive_users': $options = $options_users; break; case 'massive_policies': $options = $options_policies; break; case 'massive_snmp': $options = $options_snmp; break; case 'massive_satellite': $options = $options_satellite; break; case 'massive_plugins': $options = $options_plugins; break; } // Set the default option of the category if ($option == '') { $option = array_shift(array_keys($options)); } $alertstab = array('text' => '' . html_print_image ('images/op_alerts.png', true, array ('title' => __('Alerts operations'))) . '', 'active' => $tab == 'massive_alerts'); $userstab = array('text' => '' . html_print_image ('images/op_workspace.png', true, array ('title' => __('Users operations'))) . '', 'active' => $tab == 'massive_users'); $agentstab = array('text' => '' . html_print_image ('images/bricks.png', true, array ('title' => __('Agents operations'))) . '', 'active' => $tab == 'massive_agents'); $modulestab = array('text' => '' . html_print_image ('images/brick.png', true, array ('title' => __('Modules operations'))) . '', 'active' => $tab == 'massive_modules'); $pluginstab = array('text' => '' . html_print_image ('images/plugin.png', true, array ('title' => __('Plugins operations'))) . '', 'active' => $tab == 'massive_plugins'); $policiestab = enterprise_hook('massive_policies_tab'); if ($policiestab == ENTERPRISE_NOT_HOOK) $policiestab = ""; $snmptab = enterprise_hook('massive_snmp_tab'); if ($snmptab == ENTERPRISE_NOT_HOOK) $snmptab = ""; $satellitetab = enterprise_hook('massive_satellite_tab'); if ($satellitetab == ENTERPRISE_NOT_HOOK) $satellitetab = ""; $onheader = array(); $onheader['massive_agents'] = $agentstab; $onheader['massive_modules'] = $modulestab; $onheader['massive_plugins'] = $pluginstab; if (check_acl ($config['id_user'], 0, "PM")) { $onheader['user_agents'] = $userstab; } $onheader['massive_alerts'] = $alertstab; $onheader['policies'] = $policiestab; $onheader['snmp'] = $snmptab; $onheader['satellite'] = $satellitetab; ui_print_page_header( __('Massive operations') . ' » '. $options[$option], "images/gm_massive_operations.png", false, "", true, $onheader); // Checks if the PHP configuration is correctly if ((get_cfg_var("max_execution_time") != 0) or (get_cfg_var("max_input_time") != -1)) { echo '