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


PHP Subnets::validate_hostname方法代码示例

本文整理汇总了PHP中Subnets::validate_hostname方法的典型用法代码示例。如果您正苦于以下问题:PHP Subnets::validate_hostname方法的具体用法?PHP Subnets::validate_hostname怎么用?PHP Subnets::validate_hostname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Subnets的用法示例。


在下文中一共展示了Subnets::validate_hostname方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sizeof

             $dns_records[] = "<li><i class='icon-gray fa fa-gray fa-angle-right'></i> <span class='badge badge1 badge2 editRecord' data-action='edit' data-id='{$ptr->id}' data-domain_id='{$ptr->domain_id}'>{$ptr->type}</span> {$ptr->name} </li>";
         }
         $dns_records[] = "</ul>";
         // if none ignore
         $dns_records = sizeof($dns_records) == 3 ? "" : implode(" ", $dns_records);
     } else {
         $dns_records = "";
     }
 } else {
     $dns_records = "";
     $button = "";
 }
 // add button
 if ($User->settings->enablePowerDNS == 1) {
     // add new button
     if ($Subnets->validate_hostname($addresses[$n]->dns_name) && ($User->isadmin || @$User->user->pdns == "Yes")) {
         $button = "<i class='fa fa-plus-circle fa-gray fa-href editRecord' data-action='add' data-id='" . $Addresses->transform_address($addresses[$n]->ip_addr, "dotted") . "' data-domain_id='" . $addresses[$n]->dns_name . "'></i>";
     } else {
         $button = "";
     }
 }
 # resolve dns name
 $resolve = $DNS->resolve_address($addresses[$n]->ip_addr, $addresses[$n]->dns_name, false, $subnet['nameserverId']);
 print "<td class='{$resolve['class']} hostname'>{$resolve['name']} {$button} {$dns_records}</td>";
 # print firewall address object - mandatory if enabled
 if (in_array('firewallAddressObject', $selected_ip_fields) && $zone) {
     print "<td class='fwzone'>" . $addresses[$n]->firewallAddressObject . "</td>";
 }
 # print description - mandatory
 print "<td class='description'>" . $addresses[$n]->description . "</td>";
 # Print mac address icon!
开发者ID:dajo,项目名称:phpipam,代码行数:31,代码来源:print-address-table.php

示例2: sizeof

             $dns_records[] = "<li><i class='icon-gray fa fa-gray fa-angle-right'></i> <span class='badge badge1 badge2'>{$ptr->type}</span> {$ptr->name} </li>";
         }
         $dns_records[] = "</ul>";
         // if none ignore
         $dns_records = sizeof($dns_records) == 3 ? "" : implode(" ", $dns_records);
     } else {
         $dns_records = "";
     }
 } else {
     $dns_records = "";
     $button = "";
 }
 // add button
 if ($User->settings->enablePowerDNS == 1) {
     // add new button
     if ($Subnets->validate_hostname($addresses[$n]->dns_name)) {
         $button = "<i class='fa fa-plus-circle fa-gray fa-href editRecord' data-action='add' data-id='" . $Addresses->transform_address($addresses[$n]->ip_addr, "dotted") . "' data-domain_id='" . $addresses[$n]->dns_name . "'></i>";
     } else {
         $button = "";
     }
 }
 # resolve dns name
 $resolve = $DNS->resolve_address($addresses[$n]->ip_addr, $addresses[$n]->dns_name, false, $subnet['nameserverId']);
 print "<td class='{$resolve['class']} hostname'>{$resolve['name']} {$button} {$dns_records}</td>";
 # print description - mandatory
 print "<td class='description'>" . $addresses[$n]->description . "</td>";
 # Print mac address icon!
 if (in_array('mac', $selected_ip_fields)) {
     if (!empty($addresses[$n]->mac)) {
         print "<td class='narrow'><i class='info fa fa-gray fa-sitemap' rel='tooltip' data-container='body' title='" . _('MAC') . ": " . $addresses[$n]->mac . "'></i></td>";
     } else {
开发者ID:seisen,项目名称:phpipam,代码行数:31,代码来源:print-address-table.php


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