本文整理汇总了PHP中Subnets::fetch_object方法的典型用法代码示例。如果您正苦于以下问题:PHP Subnets::fetch_object方法的具体用法?PHP Subnets::fetch_object怎么用?PHP Subnets::fetch_object使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subnets
的用法示例。
在下文中一共展示了Subnets::fetch_object方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: phpipamSNMP
# verify that user is logged in
$User->check_user_session();
# snmp class
$Snmp = new phpipamSNMP();
# scan disabled
if ($User->settings->enableSNMP != "1") {
$Result->show("danger", "SNMP module disbled", true, $ajax_loaded);
}
# section check
if (!is_numeric($_POST['sectionId'])) {
$Result->show("danger", "Invalid section Id", true, $ajax_loaded);
}
if (!is_numeric($_POST['subnetId'])) {
$Result->show("danger", "Invalid subnet Id", true, $ajax_loaded);
}
$section = $Subnets->fetch_object("sections", "id", $_POST['sectionId']);
if ($section === false) {
$Result->show("danger", "Invalid section Id", true, $ajax_loaded);
}
# check section permissions
if ($Subnets->check_permission($User->user, $_POST['sectionId']) != 3) {
$Result->show("danger", _('You do not have permissions to add new subnet in this section') . "!", true, $ajax_loaded);
}
// no errors
error_reporting(E_ERROR);
# fetch devices that use get_routing_table query
$devices_used = $Tools->fetch_multiple_objects("devices", "snmp_queries", "%get_routing_table%", "id", true, true);
# recolaculate ids for info
foreach ($devices_used as $d) {
$devices_info[$d->id] = $d;
}