本文整理匯總了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);
}