当前位置: 首页>>代码示例>>PHP>>正文


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怎么用?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]) {
开发者ID:rtd,项目名称:phpipam,代码行数:31,代码来源:print-address-table.php

示例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']);
开发者ID:martinsv,项目名称:phpipam,代码行数:31,代码来源:search-results-export.php


注:本文中的Addresses::address_type_index_to_type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。