";
// 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 = get_db_sql ("SELECT count(*) from tserver where server_type = 1"); //POSTGRESQL COMPATIBLE
$wmi_available = get_db_sql ("SELECT count(*) from tserver where server_type = 6"); //POSTGRESQL COMPATIBLE
$plugin_available = get_db_sql ("SELECT count(*) from tserver where server_type = 4"); //POSTGRESQL COMPATIBLE
$prediction_available = get_db_sql ("SELECT count(*) from tserver where server_type = 5"); //POSTGRESQL COMPATIBLE
// Development mode to use all servers
if ($develop_bypass) {
$network_available = 1;
$wmi_available = 1;
$plugin_available = 1;
$prediction_available = 1;
}
$modules = array ();
$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');
enterprise_hook ('set_enterprise_module_types', array (&$modules));
$sec2 = get_parameter('sec2', '');
if (strstr($sec2, "enterprise/godmode/policies/policies") !== false) {
unset($modules['predictionserver']);
}
print_select ($modules, 'moduletype', '', '', '', '', false, false, false);
print_input_hidden ('edit_module', 1);
echo ' | ';
echo '';
echo '';
echo ' | ';
echo '
';
echo "