From a416a97d67252ca6dbe1b4c2c7d690778a326ef3 Mon Sep 17 00:00:00 2001 From: David Ramos Date: Mon, 4 Dec 2017 10:57:28 +0100 Subject: [PATCH] =?UTF-8?q?Recuperaci=C3=B3n=20correcta=20de=20la=20ipv4?= =?UTF-8?q?=20para=20la=20inserci=C3=B3n=20de=20los=20registros=20tipo=20A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- new_service_webdns.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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