'; echo '
"; echo __('Search').' '.html_print_input_text( 'search_string', $search_string, '', 15, 255, true ); html_print_input_hidden('search', 1); // Search string filter form. if (($policy_page !== false) || (isset($agent) === true)) { echo ' | '; echo ""; html_print_submit_button(__('Filter'), 'filter', false, 'class="sub search"'); echo ' | '; echo ""; echo ''; // Check if there is at least one server of each type available to assign that // kind of modules. If not, do not show server type in combo. $network_available = db_get_sql( 'SELECT count(*) FROM tserver WHERE server_type = '.SERVER_TYPE_NETWORK ); // POSTGRESQL AND ORACLE COMPATIBLE. $wmi_available = db_get_sql( 'SELECT count(*) FROM tserver WHERE server_type = '.SERVER_TYPE_WMI ); // POSTGRESQL AND ORACLE COMPATIBLE. $plugin_available = db_get_sql( 'SELECT count(*) FROM tserver WHERE server_type = '.SERVER_TYPE_PLUGIN ); // POSTGRESQL AND ORACLE COMPATIBLE. $prediction_available = db_get_sql( 'SELECT count(*) FROM tserver WHERE server_type = '.SERVER_TYPE_PREDICTION ); // POSTGRESQL AND ORACLE COMPATIBLE. $web_available = db_get_sql( 'SELECT count(*) FROM tserver WHERE server_type = '.SERVER_TYPE_WEB ); // POSTGRESQL AND ORACLE COMPATIBLE. // Development mode to use all servers. if ($develop_bypass || is_metaconsole()) { $network_available = 1; $wmi_available = 1; $plugin_available = 1; // FIXME when prediction predictions server modules can be configured. // on metaconsole. $prediction_available = is_metaconsole() ? 0 : 1; } $modules = []; $modules['dataserver'] = __('Create a new data server module'); if ($network_available) { $modules['networkserver'] = __('Create a new network server module'); } if ($plugin_available) { $modules['pluginserver'] = __('Create a new plugin server module'); } if ($wmi_available) { $modules['wmiserver'] = __('Create a new WMI server module'); } if ($prediction_available) { $modules['predictionserver'] = __('Create a new prediction server module'); } if ($web_available) { $modules['webserver'] = __('Create a new web Server module'); } if (enterprise_installed()) { set_enterprise_module_types($modules); } $sec2 = get_parameter('sec2', ''); if (strstr($sec2, 'enterprise/godmode/policies/policies') !== false) { // It is unset because the policies haven't a table tmodule_synth and the // some part of code to apply this kind of modules in policy agents. // But in the future maybe will be good to make this feature, but remember // the modules to show in syntetic module policy form must be the policy // modules from the same policy. unset($modules['predictionserver']); if (enterprise_installed()) { unset($modules['webux']); } } $show_creation = false; $checked = get_parameter('checked'); if (($policy_page) || (isset($agent))) { if ($policy_page) { $show_creation = is_management_allowed(); } else { if (isset($all_groups) === false) { $all_groups = agents_get_all_groups_agent( $agent['id_agente'], $agent['id_grupo'] ); } if (check_acl_one_of_groups($config['id_user'], $all_groups, 'AW')) { $show_creation = true; } } if ($show_creation === true) { // Create module/type combo. echo ' |