本文整理汇总了PHP中NetworkPort::check方法的典型用法代码示例。如果您正苦于以下问题:PHP NetworkPort::check方法的具体用法?PHP NetworkPort::check怎么用?PHP NetworkPort::check使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkPort
的用法示例。
在下文中一共展示了NetworkPort::check方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: NetworkPort
$np = new NetworkPort();
$nn = new NetworkPort_NetworkPort();
$npv = new NetworkPort_Vlan();
if (!isset($_GET["id"])) {
$_GET["id"] = "";
}
if (isset($_POST["add"])) {
// Is a preselected mac adress selected ?
if (isset($_POST['pre_mac'])) {
if (!empty($_POST['pre_mac'])) {
$_POST['mac'] = $_POST['pre_mac'];
}
unset($_POST['pre_mac']);
}
if (!isset($_POST["several"])) {
$np->check(-1, 'w', $_POST);
$np->splitInputForElements($_POST);
$newID = $np->add($_POST);
$np->updateDependencies(1);
Event::log($newID, "networkport", 5, "inventory", sprintf(__('%s adds an item'), $_SESSION["glpiname"]));
Html::back();
} else {
Session::checkRight("networking", "w");
$input = $_POST;
unset($input['several']);
unset($input['from_logical_number']);
unset($input['to_logical_number']);
for ($i = $_POST["from_logical_number"]; $i <= $_POST["to_logical_number"]; $i++) {
$add = "";
if ($i < 10) {
$add = "0";
示例2: NetworkPort
$np = new NetworkPort();
$nn = new NetworkPort_NetworkPort();
$npv = new NetworkPort_Vlan();
if (!isset($_GET["id"])) {
$_GET["id"] = "";
}
if (isset($_POST["add"])) {
// Is a preselected mac adress selected ?
if (isset($_POST['pre_mac'])) {
if (!empty($_POST['pre_mac'])) {
$_POST['mac'] = $_POST['pre_mac'];
}
unset($_POST['pre_mac']);
}
if (!isset($_POST["several"])) {
$np->check(-1, UPDATE, $_POST);
$np->splitInputForElements($_POST);
$newID = $np->add($_POST);
$np->updateDependencies(1);
Event::log($newID, "networkport", 5, "inventory", sprintf(__('%s adds an item'), $_SESSION["glpiname"]));
Html::back();
} else {
Session::checkRight("networking", UPDATE);
$input = $_POST;
unset($input['several']);
unset($input['from_logical_number']);
unset($input['to_logical_number']);
for ($i = $_POST["from_logical_number"]; $i <= $_POST["to_logical_number"]; $i++) {
$add = "";
if ($i < 10) {
$add = "0";