print "</tr>"; } } # # print IP address # # ip - range if (@$addresses[$n]->class == "compressed-range") { print "<tr class='dhcp'>"; print "\t<td>"; # status icon if ($subnet['pingSubnet'] == "1") { print "\t\t<span class='status status-padded'></span>"; } print $Subnets->transform_to_dotted($addresses[$n]->ip_addr) . ' - ' . $Subnets->transform_to_dotted($addresses[$n]->stopIP) . " (" . $addresses[$n]->numHosts . ")"; print $Addresses->address_type_format_tag($addresses[$n]->state); print "\t</td>"; print "\t<td>" . $Addresses->address_type_index_to_type($addresses[$n]->state) . " (" . _("range") . ")</td>"; print "\t<td>" . $addresses[$n]->description . "</td>"; if ($colspan['dhcp'] != 0) { print "\t<td colspan='{$colspan['dhcp']}' class='unused'></td>"; } // tr ends after! } else { print "<tr>"; # status icon if ($subnet['pingSubnet'] == "1") { //calculate $tDiff = time() - strtotime($addresses[$n]->lastSeen); if ($addresses[$n]->excludePing == "1") { $hStatus = "padded";
//get section $section = (array) $Sections->fetch_section(null, $subnet['sectionId']); //detect section change and print headers if ($result_addresses[$m]->subnetId != @$result_addresses[$m - 1]->subnetId) { print '<tr>' . "\n"; print ' <th colspan="' . $address_span . '">' . $section['name'] . ' :: <a href="' . create_link("subnets", $subnet['sectionId'], $subnet['id']) . '" style="font-weight:300">' . $subnet['description'] . ' (' . $Subnets->transform_to_dotted($subnet['subnet']) . '/' . $subnet['mask'] . ')</a></th>' . "\n"; print '</tr>'; } $m++; //print table print '<tr class="ipSearch" id="' . $line['id'] . '" subnetId="' . $line['subnetId'] . '" sectionId="' . $subnet['sectionId'] . '" link="' . $section['name'] . '|' . $subnet['id'] . '">' . "\n"; //address print ' <td><a href="' . create_link("subnets", $subnet['sectionId'], $subnet['id'], "address-details", $line['id']) . '">' . $Subnets->transform_to_dotted($line['ip_addr']) . "</a>"; //tag if (in_array('state', $selected_ip_fields)) { print $Addresses->address_type_format_tag($line['state']); } print ' </td>' . "\n"; //description print ' <td>' . $Result->shorten_text($line['description'], $chars = 50) . '</td>' . "\n"; //dns print ' <td>' . $line['dns_name'] . '</td>' . "\n"; //mac if (in_array('mac', $selected_ip_fields)) { print ' <td>' . "\n"; if (strlen($line['mac']) > 0) { print '<i class="fa fa-sitemap fa-gray" rel="tooltip" title="MAC: ' . $line['mac'] . '"></i>' . "\n"; } print ' </td>' . "\n"; } //device