Beispiel #1
0
if ($_SERVER['HTTP_X_REQUESTED_WITH'] != "XMLHttpRequest") {
    # 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 = 5;
    # and print title
    print "<div class='container'>";
    print "<h4 style='margin-top:40px;'>{$widget->wtitle}</h4><hr>";
    print "</div>";
}
if ($User->settings->enableThreshold == "1") {
    # get thresholded subnets
    $threshold_subnets = $Subnets->fetch_threshold_subnets(1000);
    # any found ?
    if ($threshold_subnets !== false) {
        # loop
        foreach ($threshold_subnets as $s) {
            # check permission of user
            $sp = $Subnets->check_permission($User->user, $s->id);
            if ($sp != "0") {
                $out[] = $s;
            }
        }
    }
}
# disabled
if ($User->settings->enableThreshold != "1") {
    print "<hr>";