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