if (isset($errors)) { $log = $Result->array_to_log($errors); $Result->show("danger", $log, false); $Log->write("IP address modification", "'Error {$action} range {$address['start']} - {$address['stop']}<br> {$log}", 2); } else { # reset IP for mailing $address['ip_addr'] = $address['start'] . ' - ' . $address['stop']; # log and changelog $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) {