ocsinventoryng is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ocsinventoryng is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ocsinventoryng. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkRight("plugin_ocsinventoryng", UPDATE); Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "modifysubnet"); $ip = new PluginOcsinventoryngIpdiscoverOcslink(); if (isset($_GET["ip"])) { $_POST["ip"] = $_GET["ip"]; } if (isset($_POST["ip"])) { $ipAdress = $_POST["ip"]; $values = array(); if (isset($_POST["subnetName"]) && isset($_POST["subnetChoice"]) && isset($_POST["SubnetMask"])) { $values = array("subnetName" => $_POST["subnetName"], "subnetChoice" => $_POST["subnetChoice"], "subnetMask" => $_POST["SubnetMask"]); } $ip->modifyNetworkForm($ipAdress, $values); } Html::footer();
the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ocsinventoryng is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ocsinventoryng. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkRight("plugin_ocsinventoryng", UPDATE); Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "importipdiscover"); $ip = new PluginOcsinventoryngIpdiscoverOcslink(); if (!isset($_GET['action'])) { $_GET['action'] = "import"; } if (isset($_GET["ip"]) || isset($_POST["ip"])) { $ocsServerId = $_SESSION["plugin_ocsinventoryng_ocsservers_id"]; $status = $_GET["status"]; $glpiListLimit = $_SESSION["glpilist_limit"]; $ipAdress = ""; if (isset($_GET["ip"])) { $ipAdress = $_GET["ip"]; } else { $ipAdress = $_POST["ip"]; } $subnet = PluginOcsinventoryngIpdiscoverOcslink::getSubnetIDbyIP($ipAdress); $hardware = array();
-------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkSeveralRightsOr(array("plugin_ocsinventoryng" => READ, "plugin_ocsinventoryng_clean" => READ)); Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "ocsinventoryng"); if (isset($_SESSION["ocs_import"])) { unset($_SESSION["ocs_import"]); } if (isset($_SESSION["ocs_link"])) { unset($_SESSION["ocs_link"]); } if (isset($_SESSION["ocs_update"])) { unset($_SESSION["ocs_update"]); } if (isset($_POST["plugin_ocsinventoryng_ocsservers_id"])) { $_SESSION["plugin_ocsinventoryng_ocsservers_id"] = $_POST["plugin_ocsinventoryng_ocsservers_id"]; } else { $_SESSION["plugin_ocsinventoryng_ocsservers_id"] = PluginOcsinventoryngOcsServer::getFirstServer(); } //PluginOcsinventoryngOcsServer::newOcsMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]); $menu = new PluginOcsinventoryngMenu(); $menu->show(); //load mac constructors in sessionMemory $_SESSION["OCS"]["count"] = 0; if (!isset($_SESSION["OCS"]["IpdiscoverMacConstructors"])) { $ip = new PluginOcsinventoryngIpdiscoverOcslink(); $ip->loadMacConstructor(); $_SESSION["OCS"]["count"] = $_SESSION["OCS"]["count"] + 1; } //PluginOcsinventoryngOcsServer::ocsMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]); Html::footer();
/** * @param CommonGLPI $item * @param int $tabnum * @param int $withtemplate * @return bool */ static function displayTabContentForItem(CommonGLPI $item, $tabnum = 0, $withtemplate = 0) { if ($item->getType() == __CLASS__) { $ocs = new PluginOcsinventoryngOcsServer(); $ipdisc = new PluginOcsinventoryngIpdiscoverOcslink(); $snmp = new PluginOcsinventoryngSnmpOcslink(); switch ($tabnum) { case 0: $ocs->setupMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]); break; case 1: $ocs->importMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]); break; case 2: $ipdisc->ipDiscoverMenu(); break; case 3: $snmp->snmpMenu($_SESSION["plugin_ocsinventoryng_ocsservers_id"]); break; } } return true; }
/** * if Phone purged * * @param $pho Phone object **/ static function purgePhone(Phone $pho) { $snmp = new self(); $snmp->deleteByCriteria(array('items_id' => $pho->getField("id"), 'itemtype' => $pho->getType())); $ipdiscover = new PluginOcsinventoryngIpdiscoverOcslink(); $ipdiscover->deleteByCriteria(array('items_id' => $pho->getField("id"), 'itemtype' => $pho->getType())); }
the Free Software Foundation; either version 2 of the License, or (at your option) any later version. ocsinventoryng is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ocsinventoryng. If not, see <http://www.gnu.org/licenses/>. -------------------------------------------------------------------------- */ include '../../../inc/includes.php'; Session::checkRight("plugin_ocsinventoryng", READ); Html::header('OCS Inventory NG', '', "tools", "pluginocsinventoryngmenu", "importipdiscover"); $ip = new PluginOcsinventoryngIpdiscoverOcslink(); if (empty($_POST)) { $_POST = $_GET; } if (!isset($_GET['action'])) { $_GET['action'] = "import"; } if (isset($_GET['subnetsChoice'])) { $_POST["subnetsChoice"] = $_GET['subnetsChoice']; } if (isset($_POST["subnetsChoice"]) && isset($_SESSION["subnets"]) || isset($_SESSION["subnets"])) { $sN = ""; $networksDetail = array(); $ocsServerId = $_SESSION["plugin_ocsinventoryng_ocsservers_id"]; $tab = $_SESSION["subnets"]; $subnets = $ip->getSubnets($ocsServerId);