Exemplo n.º 1
0
<?php

/**
 * Script to display switches
 *
 */
/* verify that user is authenticated! */
isUserAuthenticated();
/* get all unique switches */
$settings = getAllSettings();
/* get all selected fields for IP print */
$setFieldsTemp = getSelectedIPaddrFields();
/* format them to array! */
$setFields = explode(";", $setFieldsTemp);
?>



<h4><?php 
print _('Tools');
?>
</h4>
<ul class="nav nav-tabs nav-stacked nav-tools">
	<li <?php 
if ($_REQUEST['toolsId'] == "ipCalc") {
    print "class='active'";
}
?>
>
		<a href="tools/ipCalc/"><i class="icon-chevron-right pull-right icon-gray"></i> <?php 
print _('IP calculator');
Exemplo n.º 2
0
    if ($sort['direction'] == "asc") {
        $sort['directionNext'] = "desc";
    } else {
        $sort['directionNext'] = "asc";
    }
    /** 
     * Parse IP addresses
     *
     * We provide subnet and mask, all other is calculated based on it (subnet, broadcast,...)
     */
    $SubnetParsed = parseIpAddress(transform2long($SubnetDetails['subnet']), $SubnetDetails['mask']);
}
/* verify that user is authenticated! */
isUserAuthenticated();
/* get all selected fields for IP print */
$setFields = getSelectedIPaddrFields();
/* format them to array! */
$setFields = explode(";", $setFields);
/**
 * Get all ip addresses in subnet and subnet details!
 */
$title = _("IP addresses in subnet ");
# prefix for multiple subnets
if (sizeof($slaves) == 0) {
    $ipaddresses = getIpAddressesBySubnetIdSort($subnetId, $sort['field'], $sort['direction']);
    $slavePing = false;
} else {
    $ipaddresses = getIpAddressesBySubnetIdSlavesSort($subnetId, $sort['field'], $sort['direction']);
    $title = _("All IP addresses belonging to ALL nested subnets");
    $slavePing = true;
}