本文整理汇总了PHP中Addresses::address_type_index_to_type方法的典型用法代码示例。如果您正苦于以下问题:PHP Addresses::address_type_index_to_type方法的具体用法?PHP Addresses::address_type_index_to_type怎么用?PHP Addresses::address_type_index_to_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Addresses
的用法示例。
在下文中一共展示了Addresses::address_type_index_to_type方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: time
}
#
# 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";
$hTooltip = "";
} elseif ($tDiff < $statuses[0]) {
示例2:
if ($result_addresses[$m]->subnetId != $result_addresses[$m - 1]->subnetId) {
//new line
$lineCount++;
//subnet details
$worksheet->write($lineCount, 0, $Subnets->transform_to_dotted($subnet['subnet']) . "/" . $subnet['mask'] . " - " . $subnet['description'] . $vlanText, $format_title);
$worksheet->mergeCells($lineCount, 0, $lineCount, $colSpan - 1);
//new line
$lineCount++;
}
$m++;
$x = 0;
$worksheet->write($lineCount, $x, $Subnets->transform_to_dotted($ip['ip_addr']), $format_left);
$x++;
# state
if (in_array('state', $selected_ip_fields)) {
$worksheet->write($lineCount, $x, _($Addresses->address_type_index_to_type($ip['state'])));
$x++;
}
$worksheet->write($lineCount, $x, $ip['description']);
$x++;
$worksheet->write($lineCount, $x, $ip['dns_name']);
$x++;
# switch
if (in_array('switch', $selected_ip_fields)) {
if (strlen($ip['switch']) > 0 && $ip['switch'] != 0) {
$device = (array) $Tools->fetch_device(null, $ip['switch']);
$ip['switch'] = $device != 0 ? $device['hostname'] : "";
} else {
$ip['switch'] = "";
}
$worksheet->write($lineCount, $x, $ip['switch']);