static function auth_dropdown($selected = "")
 {
     global $DB;
     $plugin_fusioninventory_snmp_auth = new PluginFusioninventorySnmpauth();
     $config = new PluginFusioninventoryConfig();
     if ($config->getValue("authsnmp") == "file") {
         echo $plugin_fusioninventory_snmp_auth->selectbox($selected);
     } else {
         if ($config->getValue("authsnmp") == "DB") {
             Dropdown::show("PluginFusioninventorySnmpauth", array('name' => "FK_snmp_connection", 'value' => $selected, 'comments' => false));
         }
     }
 }
Example #2
0
function plugin_fusioninventory_MassiveActionsFieldsDisplay($type, $table, $field, $linkfield)
{
    global $LINK_ID_TABLE, $LANG;
    // Table fields
    //echo $table.".".$field."<br/>";
    switch ($table . "." . $field) {
        case 'glpi_plugin_fusioninventory_snmpauths.name':
            Dropdown::show("PluginFusioninventorySnmpauth", array('name' => $linkfield));
            return true;
            break;
        case 'glpi_plugin_fusioninventory_model_infos.name':
            Dropdown::show("PluginFusioninventoryModelInfos", array('name' => $linkfield, 'comments' => false));
            return true;
            break;
        case 'glpi_plugin_fusioninventory_unknown_device.type':
            $type_list = array();
            $type_list[] = COMPUTER_TYPE;
            $type_list[] = NETWORKING_TYPE;
            $type_list[] = PRINTER_TYPE;
            $type_list[] = PERIPHERAL_TYPE;
            $type_list[] = PHONE_TYPE;
            Device::dropdownTypes('type', $linkfield, $type_list);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.ID':
            Dropdown::show("PluginFusioninventoryAgents", array('name' => $linkfield, 'comments' => false));
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.nb_process_query':
            Dropdown::showInteger("nb_process_query", $linkfield, 1, 200);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.nb_process_discovery':
            Dropdown::showInteger("nb_process_discovery", $linkfield, 1, 400);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.logs':
            $ArrayValues[] = $LANG["choice"][0];
            $ArrayValues[] = $LANG["choice"][1];
            $ArrayValues[] = $LANG["setup"][137];
            Dropdown::showFromArray('logs', $ArrayValues, array('value' => $linkfield));
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.core_discovery':
            Dropdown::showInteger("core_discovery", $linkfield, 1, 32);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.core_query':
            Dropdown::showInteger("core_query", $linkfield, 1, 32);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.threads_discovery':
            Dropdown::showInteger("threads_discovery", $linkfield, 1, 400);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_agents.threads_query':
            Dropdown::showInteger("threads_query", $linkfield, 1, 400);
            return true;
            break;
        case 'glpi_plugin_fusioninventory_discovery.FK_snmp_connection':
            $plugin_fusioninventory_snmp = new PluginFusioninventorySnmpauth();
            echo $plugin_fusioninventory_snmp->selectbox();
            return true;
            break;
        case 'glpi_plugin_fusioninventory_model_infos.device_type':
            $type_list = array();
            $type_list[] = COMPUTER_TYPE;
            $type_list[] = NETWORKING_TYPE;
            $type_list[] = PRINTER_TYPE;
            $type_list[] = PERIPHERAL_TYPE;
            $type_list[] = PHONE_TYPE;
            Device::dropdownTypes('type', $linkfield, $type_list);
            return true;
            break;
    }
    return false;
}