diff --git a/new_service_webdns.php b/new_service_webdns.php index d2e6cb6..d957eec 100755 --- a/new_service_webdns.php +++ b/new_service_webdns.php @@ -601,7 +601,9 @@ class page_action extends tform_actions { $camDominio = $app->db->queryOneRecord('SELECT origin FROM dns_soa WHERE origin LIKE "'.$this->dominio.'%"'); $camDnsRR = $app->db->queryOneRecord('SELECT server_id, zone FROM dns_rr WHERE name LIKE "'.$this->dominio.'%"'); - $camServIP = $app->db->queryOneRecord('SELECT ip_address FROM server_ip WHERE server_id = "'.$camDnsRR['server_id'].'"'); + //Para los registros tipo A la ip tiene que ser tipo IPv4 + $camServIP = $app->db->queryOneRecord("SELECT ip_address FROM server_ip WHERE server_id = ".$camDnsRR['server_id']." AND ip_type='IPv4'"); + //print_r($camDominio); //print_r($camDnsRR); @@ -631,7 +633,6 @@ class page_action extends tform_actions { ); //print "
"; print_r($paramSubDominios); print "\n"; - //$remote = new remote_actions; //Inserto en bbdd usando la clase remoto que se la he pasado en parámetros de la función //$resultado = $remoto->insert_query('../dns/form/dns_a.tform.php', $fields['client_id'], $paramSubDominios); $resultado = $remoto->insert_query('form/dns_a_webdns.tform.php', $fields['client_group_id'], $paramSubDominios); @@ -676,14 +677,14 @@ class page_action extends tform_actions { $client_group_id = $res['groupid']; //Captura del servidor id - if($this->id > 0) { + /*if($this->id > 0) { $server_id = $this->dataRecord["server_id"]; } else { // Get the first server ID $tmp = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = 1 ORDER BY server_name LIMIT 0,1"); $server_id = $tmp['server_id']; //$this->elServidor = $server_id; - } + }*/ //echo ('El server es: ' . $dns_servidor['default_webserver']); // add site