当前位置: 首页>>代码示例>>PHP>>正文


PHP Device::dropdownTypes方法代码示例

本文整理汇总了PHP中Device::dropdownTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP Device::dropdownTypes方法的具体用法?PHP Device::dropdownTypes怎么用?PHP Device::dropdownTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Device的用法示例。


在下文中一共展示了Device::dropdownTypes方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showForm

 function showForm($target, $ID = '')
 {
     global $DB, $CFG_GLPI, $LANG;
     if ($ID != '') {
         $this->getFromDB($ID);
     } else {
         $this->getEmpty();
     }
     $this->showTabs($ID, "", $_SESSION['glpi_tab']);
     echo "<div align='center'><form method='post' name='' id=''  action=\"" . $target . "\">";
     echo "<table class='tab_cadre' cellpadding='5' width='950'>";
     echo "<tr>";
     echo "<th colspan='2'>";
     echo $LANG['plugin_fusioninventory']["constructdevice"][0];
     echo " :</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['common'][5] . ": \t</td><td>";
     Dropdown::show("Manufacturer", array('name' => "FK_glpi_enterprise", 'value' => $this->fields["FK_glpi_enterprise"]));
     echo "</td>";
     echo "<tr>";
     echo "<td>" . $LANG['setup'][71] . ": \t</td><td>\n";
     Dropdown::show("NetworkEquipmentFirmware", array('name' => "firmware", 'value' => $this->fields["firmware"]));
     echo "</td>";
     echo "</tr>\n";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['common'][25] . "</td>";
     echo "<td>";
     echo "<textarea name='sysdescr'  cols='110' rows='4' />" . $this->fields["sysdescr"] . "</textarea>";
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td>" . $LANG['common'][17] . " :</td>";
     echo "<td>";
     $type_list = array();
     $type_list[] = COMPUTER_TYPE;
     $type_list[] = NETWORKING_TYPE;
     $type_list[] = PRINTER_TYPE;
     $type_list[] = PERIPHERAL_TYPE;
     $type_list[] = PHONE_TYPE;
     // GENERIC OBJECT : Search types in generic object
     $plugin = new Plugin();
     if ($plugin->isActivated('genericobject')) {
         if (TableExists("glpi_plugin_genericobject_types")) {
             $query = "SELECT * FROM `glpi_plugin_genericobject_types`\n                  WHERE `status`='1' ";
             if ($result = $DB->query($query)) {
                 while ($data = $DB->fetch_array($result)) {
                     $type_list[] = $data['device_type'];
                 }
             }
         }
     }
     // END GENERIC OBJECT
     Device::dropdownTypes('type', $this->fields["type"], $type_list);
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'><td align='center' colspan='3'>";
     if ($ID == '') {
         echo "<div align='center'><input type='submit' name='add' value=\"" . $LANG["buttons"][8] . "\" class='submit' >";
     } else {
         echo "<input type='hidden' name='ID' value='" . $ID . "'/>";
         echo "<div align='center'><input type='submit' name='update' value=\"" . $LANG["buttons"][7] . "\" class='submit' >";
         echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' name='delete' value=\"" . $LANG["buttons"][6] . "\" class='submit'>";
     }
     echo "</td></tr>";
     echo "</table></form></div>";
 }
开发者ID:Hawke,项目名称:fusioninventory-for-glpi,代码行数:67,代码来源:constructdevice.class.php

示例2: showForm

 function showForm($target, $ID = '')
 {
     global $DB, $CFG_GLPI, $LANG;
     PluginFusioninventoryAuth::checkRight("snmp_networking", "r");
     $CommonItem = new CommonItem();
     if ($ID != '') {
         $this->getFromDB($ID);
     } else {
         $this->getEmpty();
     }
     echo "<div align='center'><form method='post' name='' id=''  action=\"" . $target . "\">";
     echo "<table  class='tab_cadre_fixe'>";
     echo "<tr><th colspan='4'>";
     echo $LANG['plugin_fusioninventory']["menu"][4] . " ( " . $LANG['plugin_fusioninventory']["unknown"][3] . " ";
     $CommonItem->getFromDB(PLUGIN_FUSIONINVENTORY_SNMP_AGENTS, $this->fields["FK_agent"]);
     echo $CommonItem->getLink(1);
     echo ") :</th></tr>";
     $datestring = $LANG["common"][26] . ": ";
     $date = convDateTime($this->fields["date_mod"]);
     echo "<tr>";
     echo "<th align='center' width='450' colspan='2'>";
     echo $LANG["common"][2] . " " . $this->fields["ID"];
     echo "</th>";
     echo "<th align='center' colspan='2' width='50'>";
     echo $datestring . $date;
     echo "</th>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>" . $LANG["common"][16] . " :</td>";
     echo "<td align='center'>";
     echo "<input type='text' name='name' value='" . $this->fields["name"] . "' size='35'/>";
     echo "</td>";
     if (isMultiEntitiesMode()) {
         echo "<td align='center'>" . $LANG['entity'][0] . " : </td>";
         echo "</td>";
         echo "<td align='center'>";
         Dropdown::show("Entity", array('name' => 'FK_entities', 'value' => $this->fields["FK_entities"]));
         echo "</td>";
         echo "</tr>";
         echo "</tr>";
     } else {
         echo "<td align='center'></td>";
         echo "</td>";
         echo "<td align='center'></td>";
         echo "</tr>";
         echo "</tr>";
     }
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>" . $LANG['plugin_fusioninventory']["unknown"][0] . " :</td>";
     echo "<td align='center'>";
     echo "<input type='text' name='dnsname' value='" . $this->fields["dnsname"] . "' size='35'/>";
     echo "</td>";
     echo "<td align='center'>" . $LANG['common'][18] . " : </td>";
     echo "</td>";
     echo "<td align='center'>";
     echo "<input type='text' name='contact' value='" . $this->fields["contact"] . "' size='35'/>";
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>" . $LANG['common'][17] . " :</td>";
     echo "<td align='center'>";
     $type_list[] = COMPUTER_TYPE;
     $type_list[] = NETWORKING_TYPE;
     $type_list[] = PRINTER_TYPE;
     $type_list[] = PERIPHERAL_TYPE;
     $type_list[] = PHONE_TYPE;
     // GENERIC OBJECT : Search types in generic object
     $plugin = new Plugin();
     if ($plugin->isActivated('genericobject')) {
         if (TableExists("glpi_plugin_genericobject_types")) {
             $query = "SELECT * FROM `glpi_plugin_genericobject_types`\n                  WHERE `status`='1' ";
             if ($result = $DB->query($query)) {
                 while ($data = $DB->fetch_array($result)) {
                     $type_list[] = $data['device_type'];
                 }
             }
         }
     }
     // END GENERIC OBJECT
     Device::dropdownTypes('type', $this->fields["type"], $type_list);
     echo "</td>";
     echo "<td align='center'>" . $LANG['setup'][89] . " : </td>";
     echo "</td>";
     echo "<td align='center'>";
     Dropdown::show("Domain", array('name' => "domain", 'value' => $this->fields["domain"]));
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>" . $LANG['common'][15] . " :</td>";
     echo "<td align='center'>";
     Dropdown::show("Location", array('name' => "location", 'value' => $this->fields["location"]));
     echo "</td>";
     echo "<td align='center'>" . $LANG['common'][19] . " : </td>";
     echo "</td>";
     echo "<td align='center'>";
     echo "<input type='text' name='serial' value='" . $this->fields["serial"] . "' size='35'/>";
     echo "</td>";
     echo "</tr>";
     echo "<tr class='tab_bg_1'>";
     echo "<td align='center'>" . $LANG['plugin_fusioninventory']["unknown"][2] . " :</td>";
//.........这里部分代码省略.........
开发者ID:Hawke,项目名称:fusioninventory-for-glpi,代码行数:101,代码来源:unknowndevice.class.php

示例3: plugin_fusioninventory_MassiveActionsFieldsDisplay

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;
}
开发者ID:Hawke,项目名称:fusioninventory-for-glpi,代码行数:77,代码来源:hook.php


注:本文中的Device::dropdownTypes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。