check dns use of domain before delete domain from client
| | |
| | | */ |
| | | $domain = $this->dataRecord['domain']; |
| | | |
| | | $sql = "SELECT id FROM dns_soa WHERE origin = '" . $app->db->quote($domain.".") . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in dnsuse']); |
| | | } |
| | | |
| | | $sql = "SELECT id FROM dns_slave WHERE origin = '" . $app->db->quote($domain.".") . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in dnsslaveuse']); |
| | | } |
| | | |
| | | $sql = "SELECT domain_id FROM mail_domain WHERE domain = '" . $app->db->quote($domain) . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | if (is_array($res)){ |
| | |
| | | $wb['Domains'] = 'Domains'; |
| | | $wb['domain_txt'] = 'Domain'; |
| | | $wb['client_txt'] = 'Client'; |
| | | $wb['error_domain_in dnsuse'] = 'This domain cannot be deleted, because it is in use as dns zone'; |
| | | $wb['error_domain_in dnsslaveuse'] = 'This domain cannot be deleted, because it is in use as secondary dns zone'; |
| | | $wb['error_domain_in mailuse'] = 'This domain cannot be deleted, because it is in use as mail-domain'; |
| | | $wb['error_domain_in webuse'] = 'This domain cannot be deleted, because it is in use as web-domain'; |
| | | $wb['error_client_can_not_add_domain'] = 'You cannot add a new domain'; |
| | |
| | | $wb['Domains'] = 'Dominios'; |
| | | $wb['domain_txt'] = 'Dominio'; |
| | | $wb['client_txt'] = 'Cliente'; |
| | | $wb['error_domain_in dnsuse'] = 'No se puede eliminar este dominio, porque está en uso como zona dns'; |
| | | $wb['error_domain_in dnsslaveuse'] = 'No se puede eliminar este dominio, porque está en uso como zona dns secundaria'; |
| | | $wb['error_domain_in mailuse'] = 'No se puede eliminar este dominio, porque está en uso como dominio de correo'; |
| | | $wb['error_domain_in webuse'] = 'No se puede eliminar este dominio, porque está en uso como sitio web'; |
| | | $wb['error_client_can_not_add_domain'] = 'No puedes añadir más dominios'; |