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


PHP NetworkPort::showForItem方法代码示例

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


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

示例1: showNotesForm

            Plugin::displayAction($netdevice, $_REQUEST['glpi_tab']);
            break;
        case 4:
            Infocom::showForItem($netdevice);
            Contract::showAssociated($netdevice);
            break;
        case 5:
            Document::showAssociated($netdevice, $_POST["withtemplate"]);
            break;
        case 6:
            Ticket::showListForItem('NetworkEquipment', $_POST["id"]);
            break;
        case 7:
            Link::showForItem('NetworkEquipment', $_POST["id"]);
            break;
        case 10:
            showNotesForm($_POST['target'], 'NetworkEquipment', $_POST["id"]);
            break;
        case 11:
            Reservation::showForItem('NetworkEquipment', $_POST["id"]);
            break;
        case 12:
            Log::showForItem($netdevice);
            break;
        default:
            if (!Plugin::displayAction($netdevice, $_REQUEST['glpi_tab'])) {
                NetworkPort::showForItem('NetworkEquipment', $_POST["id"]);
            }
    }
}
ajaxFooter();
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:networkequipment.tabs.php

示例2: showNotesForm

            case 4:
                Infocom::showForItem($phone);
                Contract::showAssociated($phone);
                break;
            case 5:
                Document::showAssociated($phone);
                break;
            case 6:
                Ticket::showListForItem('Phone', $_POST["id"]);
                break;
            case 7:
                Link::showForItem('Phone', $_POST["id"]);
                break;
            case 10:
                showNotesForm($_POST['target'], 'Phone', $_POST["id"]);
                break;
            case 11:
                Reservation::showForItem('Phone', $_POST["id"]);
                break;
            case 12:
                Log::showForItem($phone);
                break;
            default:
                if (!Plugin::displayAction($phone, $_REQUEST['glpi_tab'])) {
                    Computer_Item::showForItem($phone);
                    NetworkPort::showForItem('Phone', $_POST["id"], 'Phone', $_POST["withtemplate"]);
                }
        }
    }
}
ajaxFooter();
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:phone.tabs.php

示例3: showNotesForm

            case 4:
                Infocom::showForItem($periph);
                Contract::showAssociated($periph);
                break;
            case 5:
                Document::showAssociated($periph);
                break;
            case 6:
                Ticket::showListForItem('Peripheral', $_POST["id"]);
                break;
            case 7:
                Link::showForItem('Peripheral', $_POST["id"]);
                break;
            case 10:
                showNotesForm($_POST['target'], 'Peripheral', $_POST["id"]);
                break;
            case 11:
                Reservation::showForItem('Peripheral', $_POST["id"]);
                break;
            case 12:
                Log::showForItem($periph);
                break;
            default:
                if (!Plugin::displayAction($periph, $_REQUEST['glpi_tab'])) {
                    Computer_Item::showForItem($periph);
                    NetworkPort::showForItem('Peripheral', $_POST["id"], $_POST["withtemplate"]);
                }
        }
    }
}
ajaxFooter();
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:peripheral.tabs.php

示例4: showForm

 function showForm(CommonDBTM $item, $options = array())
 {
     global $DB, $CFG_GLPI;
     if (!Session::haveRight('plugin_fusioninventory_networkequipment', READ)) {
         NetworkPort::showForItem($item);
         return;
     }
     $canedit = FALSE;
     if (Session::haveRight('plugin_fusioninventory_networkequipment', UPDATE)) {
         $canedit = TRUE;
     }
     $id = $item->getID();
     if (!($data = $this->find("`networkequipments_id`='" . $id . "'", '', 1))) {
         // Add in database if not exist
         $input = array();
         $input['networkequipments_id'] = $id;
         $_SESSION['glpi_plugins_fusinvsnmp_table'] = 'glpi_networkequipments';
         $ID_tn = $this->add($input);
         $this->getFromDB($ID_tn);
     } else {
         foreach ($data as $datas) {
             $this->fields = $datas;
         }
     }
     if (isset($_POST['displaysnmpinfo'])) {
         $this->showNetworkEquipmentInformation($id, $options);
         return;
     }
     //$_SESSION['plugin_fusioninventory_networkportview'] = 'glpi';
     if (!isset($_SESSION['plugin_fusioninventory_networkportview'])) {
         $_SESSION['plugin_fusioninventory_networkportview'] = 'fusioninventory';
     }
     // Display glpi network port view if no fusionnetworkport
     $query = "SELECT glpi_plugin_fusioninventory_networkports.id\n      FROM glpi_plugin_fusioninventory_networkports\n      LEFT JOIN glpi_networkports\n      ON glpi_plugin_fusioninventory_networkports.networkports_id = glpi_networkports.id\n      WHERE glpi_networkports.items_id='" . $id . "'\n         AND glpi_networkports.itemtype='NetworkEquipment'";
     $result = $DB->query($query);
     if ($DB->numrows($result) == 0) {
         NetworkPort::showForItem($item);
         return;
     }
     echo "<form action='" . $CFG_GLPI['root_doc'] . "/plugins/fusioninventory/front/networkport.display.php' method='post'>";
     echo __('Display the view', 'fusioninventory');
     echo ' <i>' . $_SESSION['plugin_fusioninventory_networkportview'] . "</i>. ";
     echo __('If you prefer, you can display the view', 'fusioninventory');
     echo ' ';
     if ($_SESSION['plugin_fusioninventory_networkportview'] == 'fusioninventory') {
         echo '<input type="submit" class="submit" name="selectview" value="glpi" />';
     } else {
         echo '<input type="submit" class="submit" name="selectview" value="fusioninventory" />';
     }
     Html::closeForm();
     if ($_SESSION['plugin_fusioninventory_networkportview'] == 'glpi') {
         NetworkPort::showForItem($item);
         return;
     }
     $canedit = $item->can($item->getID(), UPDATE);
     if ($canedit) {
         $networkPort = new NetworkPort();
         echo "\n<form method='get' action='" . $networkPort->getFormURL() . "'>\n";
         echo "<input type='hidden' name='items_id' value='" . $item->getID() . "'>\n";
         echo "<input type='hidden' name='itemtype' value='" . $item->getType() . "'>\n";
         echo "<div class='firstbloc'><table class='tab_cadre_fixe'>\n";
         echo "<tr class='tab_bg_2'><td class='center'>\n";
         _e('Network port type to be added');
         echo "&nbsp;";
         Dropdown::showFromArray('instantiation_type', NetworkPort::getNetworkPortInstantiationsWithNames(), array('value' => 'NetworkPortEthernet'));
         echo "</td>\n";
         echo "<td class='tab_bg_2 center' width='50%'>";
         _e('Add several ports');
         echo "&nbsp;<input type='checkbox' name='several' value='1'></td>\n";
         echo "<td>\n";
         echo "<input type='submit' name='create' value=\"" . _sx('button', 'Add') . "\" " . "class='submit'>\n";
         echo "</td></tr></table></div>\n";
         Html::closeForm();
     }
     $monitoring = 0;
     if (class_exists("PluginMonitoringNetworkport")) {
         $monitoring = 1;
     }
     // * Get all ports compose tha aggregat
     $a_aggregated_ports = array();
     $query = "SELECT *, glpi_plugin_fusioninventory_networkports.mac as ifmacinternal\n      FROM glpi_plugin_fusioninventory_networkports\n      LEFT JOIN glpi_networkports\n      ON glpi_plugin_fusioninventory_networkports.networkports_id = glpi_networkports.id\n      WHERE glpi_networkports.items_id='" . $id . "'\n         AND glpi_networkports.itemtype='NetworkEquipment'\n         AND `instantiation_type`='NetworkPortAggregate'\n      ORDER BY logical_number ";
     $result = $DB->query($query);
     while ($data = $DB->fetch_array($result)) {
         $query_ag = "SELECT * FROM `glpi_networkportaggregates`\n            WHERE `networkports_id`='" . $data['id'] . "'\n            LIMIT 1";
         $result_ag = $DB->query($query_ag);
         if ($DB->numrows($result_ag) > 0) {
             $data_ag = $DB->fetch_assoc($result_ag);
             $a_ports = importArrayFromDB($data_ag['networkports_id_list']);
             foreach ($a_ports as $port_id) {
                 $a_aggregated_ports[$port_id] = $port_id;
             }
         }
     }
     $where = '';
     if (count($a_aggregated_ports) > 0) {
         $where = "AND `glpi_networkports`.`id` NOT IN " . "('" . implode("', '", $a_aggregated_ports) . "')";
     }
     $query = "SELECT `glpi_networkports`.`id`, `instantiation_type`,\n         `glpi_plugin_fusioninventory_networkports`.`id` as `fusionid`\n      FROM glpi_plugin_fusioninventory_networkports\n\n      LEFT JOIN glpi_networkports\n         ON glpi_plugin_fusioninventory_networkports.networkports_id = glpi_networkports.id\n      WHERE glpi_networkports.items_id='" . $id . "'\n         AND `glpi_networkports`.`itemtype`='NetworkEquipment'\n         " . $where . "\n         AND NOT (glpi_networkports.name='general'\n                     AND glpi_networkports.logical_number=0)\n      ORDER BY logical_number ";
     $nbcol = 5;
     if ($monitoring == '1') {
//.........这里部分代码省略.........
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:101,代码来源:networkequipment.class.php

示例5:

     Infocom::showForItem($computer);
     Contract::showAssociated($computer, $_POST["withtemplate"]);
     Document::showAssociated($computer);
     Ticket::showListForItem('Computer', $_POST["id"]);
     Link::showForItem('Computer', $_POST["id"]);
     RegistryKey::showForComputer($_POST["id"]);
     ComputerVirtualMachine::showForVirtualMachine($computer);
     ComputerVirtualMachine::showForComputer($computer);
     Plugin::displayAction($computer, $_REQUEST['glpi_tab']);
     break;
 case 2:
     Computer_SoftwareVersion::showForComputer($computer);
     break;
 case 3:
     Computer_Item::showForComputer($_POST['target'], $computer);
     NetworkPort::showForItem('Computer', $_POST["id"]);
     break;
 case 4:
     Infocom::showForItem($computer);
     Contract::showAssociated($computer);
     break;
 case 5:
     Document::showAssociated($computer);
     break;
 case 6:
     Ticket::showListForItem('Computer', $_POST["id"]);
     break;
 case 7:
     Link::showForItem('Computer', $_POST["id"]);
     break;
 case 10:
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:computer.tabs.php

示例6: switch

 switch ($_REQUEST['glpi_tab']) {
     case -1:
         Cartridge::showInstalled($printer);
         Cartridge::showInstalled($printer, 1);
         Computer_Item::showForItem($printer);
         NetworkPort::showForItem('Printer', $_POST["id"], $_POST["withtemplate"]);
         Infocom::showForItem($printer);
         Contract::showAssociated($printer);
         Document::showAssociated($printer);
         Ticket::showListForItem('Printer', $_POST["id"]);
         Link::showForItem('Printer', $_POST["id"]);
         Plugin::displayAction($printer, $_REQUEST['glpi_tab']);
         break;
     case 3:
         Computer_Item::showForItem($printer);
         NetworkPort::showForItem('Printer', $_POST["id"]);
         break;
     case 4:
         Infocom::showForItem($printer);
         Contract::showAssociated($printer);
         break;
     case 5:
         Document::showAssociated($printer);
         break;
     case 6:
         Ticket::showListForItem('Printer', $_POST["id"]);
         break;
     case 7:
         Link::showForItem('Printer', $_POST["id"]);
         break;
     case 10:
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:printer.tabs.php


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