<?php /** * Script to display all slave IP addresses and subnets in content div of subnets table! ***************************************************************************************/ /* get all slaves */ $slaves = getAllSubnetsInSectionVRF($_REQUEST['vrfId'], $_REQUEST['section']); /* if none */ if (!$slaves) { print "<hr>"; print "<h4>" . _('VLAN') . " {$vrf['number']} (" . $vrf['description'] . ") " . _('has no belonging subnets') . "</h4>"; } else { /* print title */ $slaveNum = sizeof($slaves); print "<h4>" . _('VLAN') . " {$vrf['number']} (" . $vrf['description'] . ") " . _('has') . " {$slaveNum} " . _('belonging subnets') . ":</h4><hr><br>"; /* print HTML table */ print '<table class="slaves table table-striped table-condensed table-hover table-full table-top">' . "\n"; /* headers */ print "<tr>"; print "\t<th class='small description'>" . _('Subnet description') . "</th>"; print "\t<th>" . _('Subnet') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>" . _('Hosts check') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>" . _('Used') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>% " . _('Free') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>" . _('Requests') . "</th>"; print " <th class='actions'></th>"; print "</tr>"; /* print each slave */ $usedSum = 0; $allSum = 0; # for free space check
<?php /** * Script to display all slave IP addresses and subnets in content div of subnets table! ***************************************************************************************/ /* get all slaves */ $slaves = getAllSubnetsInSectionVRF($_GET['subnetId'], $_GET['section']); /* if none */ if (!$slaves) { print "<hr>"; print "<h4>" . _('VLAN') . " {$vrf['number']} (" . $vrf['description'] . ") " . _('has no belonging subnets') . "</h4>"; } else { /* print title */ $slaveNum = sizeof($slaves); print "<h4>" . _('VLAN') . " {$vrf['number']} (" . $vrf['description'] . ") " . _('has') . " {$slaveNum} " . _('belonging subnets') . ":</h4><hr><br>"; /* print HTML table */ print '<table class="slaves table table-striped table-condensed table-hover table-full table-top">' . "\n"; /* headers */ print "<tr>"; print "\t<th class='small description'>" . _('Subnet description') . "</th>"; print "\t<th>" . _('Subnet') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>" . _('Hosts check') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>" . _('Used') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>% " . _('Free') . "</th>"; print "\t<th class='small hidden-xs hidden-sm'>" . _('Requests') . "</th>"; print " <th class='actions'></th>"; print "</tr>"; /* print each slave */ $usedSum = 0; $allSum = 0; # for free space check