# get widget details if (!($widget = $Tools->fetch_object("widgets", "wfile", $_REQUEST['section']))) { $Result->show("danger", _("Invalid widget"), true); } # reset size and limit $height = 350; $slimit = 100; # and print title print "<div class='container'>"; print "<h4 style='margin-top:40px;'>{$widget->wtitle}</h4><hr>"; print "</div>"; } // time_range - 30 days $seconds = 86400 * 30; # Find inactive hosts $inactive_hosts = $Subnets->find_inactive_hosts($seconds, $slimit); # check permissions if ($inactive_hosts !== false) { foreach ($inactive_hosts as $h) { # fetch subnet $subnet = $Subnets->fetch_subnet("id", $h->subnetId); if ($subnet !== false) { # check permission of user $sp = $Subnets->check_permission($User->user, $subnet->id); if ($sp != "0") { $h->sectionId = $subnet->sectionId; $h->subnet = $subnet->subnet; $h->mask = $subnet->mask; $out[] = $h; } $m++;