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


PHP Admin::verify_checkbox方法代码示例

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


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

示例1: array

    }
    print "</ul>";
    print "<hr><div style='text-align:right'>";
    print _("Are you sure you want to delete above items?") . " ";
    print "<div class='btn-group'>";
    print "\t<a class='btn btn-sm btn-danger editSubnetSubmitDelete' id='editSubnetSubmitDelete'>" . _("Confirm") . "</a>";
    print "</div>";
    print "</div>";
    print "</div>";
} else {
    # remove scanagent if not needed
    if (!isset($_POST['pingSubnet']) && !isset($_POST['discoverSubnet'])) {
        $_POST['scanAgent'] = 0;
    }
    # create array of default update values
    $values = array("id" => @$_POST['subnetId'], "isFolder" => 0, "masterSubnetId" => $_POST['masterSubnetId'], "subnet" => $Subnets->transform_to_decimal($_POST['subnet']), "mask" => $_POST['mask'], "description" => @$_POST['description'], "vlanId" => $_POST['vlanId'], "allowRequests" => $Admin->verify_checkbox(@$_POST['allowRequests']), "showName" => $Admin->verify_checkbox(@$_POST['showName']), "discoverSubnet" => $Admin->verify_checkbox(@$_POST['discoverSubnet']), "pingSubnet" => $Admin->verify_checkbox(@$_POST['pingSubnet']), "scanAgent" => @$_POST['scanAgent'], "DNSrecursive" => $Admin->verify_checkbox(@$_POST['DNSrecursive']), "DNSrecords" => $Admin->verify_checkbox(@$_POST['DNSrecords']), "nameserverId" => $_POST['nameserverId'], "device" => $_POST['device'], "isFull" => $Admin->verify_checkbox($_POST['isFull']));
    # for new subnets we add permissions
    if ($_POST['action'] == "add") {
        $values['permissions'] = $_POST['permissions'];
        $values['sectionId'] = $_POST['sectionId'];
        // add vrf
        $values['vrfId'] = $_POST['vrfId'];
    } else {
        # if section change
        if (@$_POST['sectionId'] != @$_POST['sectionIdNew']) {
            $values['sectionId'] = $_POST['sectionIdNew'];
        }
        # if vrf change
        if (@$_POST['vrfId'] != @$_POST['vrfIdOld']) {
            $values['vrfId'] = $_POST['vrfId'];
        }
开发者ID:jselan,项目名称:phpipam,代码行数:31,代码来源:edit-result.php

示例2: explode

if (strpos($_POST['siteURL'], 'http://') !== false || strpos($_POST['siteURL'], 'https://') !== false) {
} else {
    $_POST['siteURL'] = "http://" . $_POST['siteURL'];
}
//verify ping status fields
$_POST['pingStatus'] = str_replace(" ", "", $_POST['pingStatus']);
//remove possible spaces
$_POST['pingStatus'] = str_replace(",", ";", $_POST['pingStatus']);
//change possible , for ;
$statuses = explode(";", $_POST['pingStatus']);
if (sizeof($statuses) != 2) {
    $Result->show("danger", _("Invalid ping status intervals"), true);
}
if (!is_numeric($statuses[0]) || !is_numeric($statuses[1])) {
    $Result->show("danger", _("Invalid ping status intervals"), true);
}
//verify email
if (filter_var($_POST['siteAdminMail'], FILTER_VALIDATE_EMAIL) === false) {
    $Result->show("danger", _("Invalid email"), true);
}
//verify numbers
if (!is_numeric($_POST['vlanMax'])) {
    $Result->show("danger", _("Invalid value for Max VLAN number"), true);
}
# set update values
$values = array("id" => 1, "siteTitle" => @$_POST['siteTitle'], "siteDomain" => @$_POST['siteDomain'], "siteURL" => @$_POST['siteURL'], "siteLoginText" => @$_POST['siteLoginText'], "prettyLinks" => @$_POST['prettyLinks'], "defaultLang" => @$_POST['defaultLang'], "inactivityTimeout" => @$_POST['inactivityTimeout'], "siteAdminName" => @$_POST['siteAdminName'], "siteAdminMail" => @$_POST['siteAdminMail'], "api" => $Admin->verify_checkbox(@$_POST['api']), "enableIPrequests" => $Admin->verify_checkbox(@$_POST['enableIPrequests']), "enableVRF" => $Admin->verify_checkbox(@$_POST['enableVRF']), "enableDNSresolving" => $Admin->verify_checkbox(@$_POST['enableDNSresolving']), "vlanDuplicate" => $Admin->verify_checkbox(@$_POST['vlanDuplicate']), "vlanMax" => @$_POST['vlanMax'], "enableChangelog" => $Admin->verify_checkbox(@$_POST['enableChangelog']), "tempShare" => $Admin->verify_checkbox(@$_POST['tempShare']), "enablePowerDNS" => $Admin->verify_checkbox(@$_POST['enablePowerDNS']), "enableFirewallZones" => $Admin->verify_checkbox(@$_POST['enableFirewallZones']), "log" => @$_POST['log'], "donate" => $Admin->verify_checkbox(@$_POST['donate']), "visualLimit" => @$_POST['visualLimit'], "subnetOrdering" => @$_POST['subnetOrdering'], "subnetView" => @$_POST['subnetView'], "scanPingType" => @$_POST['scanPingType'], "pingStatus" => @$_POST['pingStatus'], "scanPingPath" => @$_POST['scanPingPath'], "scanFPingPath" => @$_POST['scanFPingPath'], "scanMaxThreads" => @$_POST['scanMaxThreads']);
if (!$Admin->object_modify("settings", "edit", "id", $values)) {
    $Result->show("danger", _("Cannot update settings"), true);
} else {
    $Result->show("success", _("Settings updated successfully"), true);
}
开发者ID:mwodz,项目名称:phpipam,代码行数:31,代码来源:settings-save.php

示例3: array

# formulate update values
$values = array("id" => @$_POST['userId'], "real_name" => $_POST['real_name'], "username" => $_POST['username'], "email" => $_POST['email'], "role" => $_POST['role'], "authMethod" => $_POST['authMethod'], "lang" => $_POST['lang'], "mailNotify" => $_POST['mailNotify'], "mailChangelog" => $_POST['mailChangelog']);
# update pass ?
if (strlen(@$_POST['password1']) > 0 || @$_POST['action'] == "add" && $auth_method->type == "local") {
    $values['password'] = $_POST['password1'];
}
# pass change
if (isset($_POST['passChange']) && $auth_method->type == "local") {
    $values['passChange'] = "Yes";
}
# set groups user belongs to
if ($_POST['role'] == "Administrator") {
    $values['groups'] = null;
} else {
    foreach ($_POST as $key => $post) {
        if (substr($key, 0, 5) == "group") {
            $group[substr($key, 5)] = substr($key, 5);
        }
    }
    $values['groups'] = json_encode(@$group);
}
# execute
if (!$Admin->object_modify("users", $_POST['action'], "id", $values)) {
    $Result->show("danger", _("User {$_POST['action']} failed") . '!', true);
} else {
    $Result->show("success", _("User {$_POST['action']} successfull") . '!', false);
}
/* mail user */
if ($Admin->verify_checkbox(@$_POST['notifyUser']) == 1) {
    include "edit-notify.php";
}
开发者ID:netbuild,项目名称:phpipam,代码行数:31,代码来源:edit-result.php

示例4: foreach

    }
}
# update pass ?
if (strlen(@$_POST['password1']) > 0 || @$_POST['action'] == "add" && $auth_method->type == "local") {
    $values['password'] = $_POST['password1'];
}
# pass change
if (isset($_POST['passChange']) && $auth_method->type == "local") {
    $values['passChange'] = "Yes";
}
# set groups user belongs to
if ($_POST['role'] == "Administrator") {
    $values['groups'] = null;
} else {
    foreach ($_POST as $key => $post) {
        if (substr($key, 0, 5) == "group") {
            $group[substr($key, 5)] = substr($key, 5);
        }
    }
    $values['groups'] = json_encode(@$group);
}
# execute
if (!$Admin->object_modify("users", $_POST['action'], "id", $values)) {
    $Result->show("danger", _("User {$_POST['action']} failed") . '!', true);
} else {
    $Result->show("success", _("User {$_POST['action']} successfull") . '!', false);
}
# mail user
if ($Admin->verify_checkbox(@$_POST['notifyUser']) != "0") {
    include "edit-notify.php";
}
开发者ID:routenull0,项目名称:phpipam,代码行数:31,代码来源:edit-result.php

示例5: array

    print "<strong>" . _("Warning") . "</strong>: " . _("I will delete") . ":<ul>";
    print "\t<li>{$subcnt} " . _("subnets") . "</li>";
    if ($ipcnt > 0) {
        print "\t<li>{$ipcnt} " . _("IP addresses") . "</li>";
    }
    print "</ul>";
    print "<hr><div style='text-align:right'>";
    print _("Are you sure you want to delete above items?") . " ";
    print "<div class='btn-group'>";
    print "\t<a class='btn btn-sm btn-danger editSubnetSubmitDelete' id='editSubnetSubmitDelete'>" . _("Confirm") . "</a>";
    print "</div>";
    print "</div>";
    print "</div>";
} else {
    # create array of default update values
    $values = array("id" => @$_POST['subnetId'], "isFolder" => 0, "masterSubnetId" => $_POST['masterSubnetId'], "subnet" => $Subnets->transform_to_decimal($_POST['subnet']), "mask" => $_POST['mask'], "description" => @$_POST['description'], "vlanId" => $_POST['vlanId'], "allowRequests" => $Admin->verify_checkbox(@$_POST['allowRequests']), "showName" => $Admin->verify_checkbox(@$_POST['showName']), "discoverSubnet" => $Admin->verify_checkbox(@$_POST['discoverSubnet']), "pingSubnet" => $Admin->verify_checkbox(@$_POST['pingSubnet']));
    # for new subnets we add permissions
    if ($_POST['action'] == "add") {
        $values['permissions'] = $_POST['permissions'];
        $values['sectionId'] = $_POST['sectionId'];
    } else {
        # if section change
        if (@$_POST['sectionId'] != @$_POST['sectionIdNew']) {
            $values['sectionId'] = $_POST['sectionIdNew'];
        }
        # if vrf change
        if (@$_POST['vrfId'] != @$_POST['vrfIdOld']) {
            $values['vrfId'] = $_POST['vrfId'];
        }
    }
    # append custom fields
开发者ID:rtd,项目名称:phpipam,代码行数:31,代码来源:edit-result.php


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