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


PHP NetworkPort::check方法代码示例

本文整理汇总了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";
开发者ID:geldarr,项目名称:hack-space,代码行数:31,代码来源:networkport.form.php

示例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";
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:31,代码来源:networkport.form.php


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