Beispiel #1
0
            $vars = $_SERVER["PHP_SELF"] . "?baseindex=" . $baseindex . "&block=" . floor($totcnt / MAXTABLESIZE) . "&showactive=" . $showactive . "&expr={$expr}&search=" . urlencode($search);
            insert($cblk, block(" | "));
            insert($cblk, anchor($vars, $anc . inet_ntoa($row["ipaddr"])));
        }
    }
    $totcnt++;
}
$ipscan = array();
if ($showactive and NMAP != "") {
    $nmapstart = inet_ntoa($baseaddr + $block * MAXTABLESIZE);
    if ($maxcnt > MAXTABLESIZE) {
        $nmapend = inet_ntoa($baseaddr + $block * MAXTABLESIZE + MAXTABLESIZE - 1);
    } else {
        $nmapend = inet_ntoa($baseaddr + $maxcnt - 1);
    }
    $ipscan = NmapScan(NmapRange($nmapstart, $nmapend));
    // nmap had error due to safe mode?
    if ($ipscan === FALSE) {
        $showactive = 0;
    }
}
//capture data for the export view functionality
$export = new exportForm();
$export->addRow(array("ip_addr", "user", "location", "description", "hostname", TELNO ? "telephone" : "mac_address", "last_polled", "last_modified", "changed_by"));
$export->saveRow();
$pollcnt = array("d" => 0, "w" => 0, "m" => 0, "y" => 0);
// note for translations to work here, the next field should have exactly 4x elements
$pollflag = split(":", my_("D:W:M:Y"));
$pollflag["d"] = $pollflag[0];
$pollflag["w"] = $pollflag[1];
$pollflag["m"] = $pollflag[2];
Beispiel #2
0
   ' . $jsset . '

} ', array("language" => "JavaScript", "type" => "text/javascript")));
    insert($w, $f = form(array("name" => "REQUESTIP", "method" => "get", "action" => $_SERVER["PHP_SELF"])));
    insert($f, $con = container("fieldset", array("class" => "fieldset")));
    insert($con, $legend = container("legend", array("class" => "legend")));
    insert($legend, text(my_("Requested addresses")));
    insert($con, selectbox($lst, array("name" => "request", "onChange" => "modifyipform()")));
}
// ------------------- request ip address section ends here ------------------------
// ------------------- support functions block start here ------------------------
insert($w, textB(my_("IP Address to modify:") . " " . $iptemp));
// scan the new address to see if it is currently active
if ($probe or $ipplanPoll) {
    if (NMAP != "") {
        $ipscan = NmapScan(NmapRange($iptemp, $iptemp));
        if (!empty($ipscan)) {
            insert($w, text(my_(" (Address active on network) "), array("color" => "#FF0000")));
        }
    } else {
        if (ScanHost($iptemp, 1)) {
            insert($w, text(my_(" (Address active on network) "), array("color" => "#FF0000")));
        }
    }
}
insert($w, block(" | "));
insert($w, anchor("whois.php?lookup=" . $iptemp, my_("Whois")));
insert($w, block(" | "));
// dont bother checking for safe mode as error will be thrown in called scripts
//if (!ini_get("safe_mode")) {
insert($w, anchor("ping.php?lookup=" . $iptemp, my_("Ping")));