add_zone_slave.php
changeset 161 0832d846bf8e
parent 126 cb06e3e29ed8
child 170 391e744a1def
equal deleted inserted replaced
160:19cc35549204 161:0832d846bf8e
    36 if ($_POST['submit'] && $zone_slave_add == "1") {
    36 if ($_POST['submit'] && $zone_slave_add == "1") {
    37 	if (!is_valid_domain($zone)) {
    37 	if (!is_valid_domain($zone)) {
    38 		error(ERR_DNS_HOSTNAME);
    38 		error(ERR_DNS_HOSTNAME);
    39 	} elseif (domain_exists($zone)) {
    39 	} elseif (domain_exists($zone)) {
    40 		error(ERR_DOMAIN_EXISTS);
    40 		error(ERR_DOMAIN_EXISTS);
    41 	} elseif (!is_valid_ip($master)) {
    41 	} elseif (!is_valid_ipv4($master) || !is_valid_ipv6($master)) {
    42 		error(ERR_DNS_IP);
    42 		error(ERR_DNS_IP);
    43 	} else {
    43 	} else {
    44 		if(add_domain($zone, $owner, $webip, $mailip, $empty, $type, $master)) {
    44 		if(add_domain($zone, $owner, $webip, $mailip, $empty, $type, $master)) {
    45 			success(SUC_ZONE_ADD);
    45 			success(SUC_ZONE_ADD);
    46 			unset($zone, $owner, $webip, $mailip, $empty, $type, $master);
    46 			unset($zone, $owner, $webip, $mailip, $empty, $type, $master);