本文整理汇总了PHP中Addresses::is_hostname_unique方法的典型用法代码示例。如果您正苦于以下问题:PHP Addresses::is_hostname_unique方法的具体用法?PHP Addresses::is_hostname_unique怎么用?PHP Addresses::is_hostname_unique使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Addresses
的用法示例。
在下文中一共展示了Addresses::is_hostname_unique方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$Result->show("success", _("Range") . " {$address['start']} - {$address['stop']} " . _($action) . " " . _("successfull") . "!", false);
$Log->write("IP address modification", "Range {$address['start']} - {$address['stop']} {$action} successfull!", 0);
# send changelog mail
$Log->object_action = $action;
$Log->object_type = "address range";
$Log->object_result = "success";
$Log->user = $User->user;
$Log->changelog_send_mail("Address range {$address['start']} - {$address['stop']} {$action}");
}
}
} else {
# unique hostname requested?
if (isset($address['unique'])) {
if ($address['unique'] == 1 && strlen($address['dns_name']) > 0) {
# check if unique
if (!$Addresses->is_hostname_unique($address['dns_name'])) {
$Result->show("danger", _('Hostname is not unique') . "!", true);
}
}
}
# validate and normalize MAC address
if ($action !== "delete") {
if (strlen(@$address['mac']) > 0) {
if ($User->validate_mac($address['mac']) === false) {
$Result->show("danger", _('Invalid MAC address') . "!", true);
} else {
$address['mac'] = $User->reformat_mac_address($address['mac'], 1);
}
}
}
# reset subnet if move