本文整理汇总了PHP中Subnets::find_subnet方法的典型用法代码示例。如果您正苦于以下问题:PHP Subnets::find_subnet方法的具体用法?PHP Subnets::find_subnet怎么用?PHP Subnets::find_subnet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subnets
的用法示例。
在下文中一共展示了Subnets::find_subnet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($subnets_all as $sb) {
if ($sb['subnet_dec'] !== $s['subnet_dec'] && $sb['mask'] !== $s['mask']) {
if ($Subnets->is_subnet_inside_subnet($s['subnet'], $sb['subnet'])) {
$subnets_all[$k]['master'] = $sb['subnet'];
}
}
}
}
# import each
if (isset($subnets_all)) {
foreach ($subnets_all as $s) {
# set new POST
$_POST = $s;
# create csrf token
$_POST['csrf_cookie'] = $User->csrf_cookie("create", "subnet");
# permissions
$subnet['permissions'] = $section->permissions;
# check for master
if (isset($s['master'])) {
// find id
$master = $Subnets->find_subnet($s['sectionId'], $s['master']);
if ($master !== false) {
$_POST['masterSubnetId'] = $master->id;
}
}
# include edit script
include dirname(__FILE__) . "/../../admin/subnets/edit-result.php";
}
} else {
$Result->show("danger", "No subnets selected", true);
}