| | |
| | | if($domain['ip_address'] == '' || $domain['ipv6_address'] == ''){ |
| | | if($domain['parent_domain_id'] > 0){ |
| | | $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ?", $domain['parent_domain_id']); |
| | | if(is_array($parent_domain) && !empty($parent_domain)){ |
| | | $domain['ip_address'] = $parent_domain['ip_address']; |
| | | $domain['ipv6_address'] = $parent_domain['ipv6_address']; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (d.domain = ?" . $additional_sql1 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : ""); |
| | | $params = array($domain_name) + $domain_params + array($domain['server_id'], $primary_id, $primary_id); |
| | | $params = array_merge(array($domain_name), $domain_params, array($domain['server_id'], $primary_id, $primary_id)); |
| | | $checks = $app->db->queryAllRecords($qrystr, true, $params); |
| | | if(is_array($checks) && !empty($checks)){ |
| | | foreach($checks as $check){ |
| | |
| | | } |
| | | |
| | | if($only_domain == false) { |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (CONCAT(d.subdomain, '.', d.domain)= ?" . $additional_sql2 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : ""); |
| | | $params = array($domain_name) + $domain_params + array($domain['server_id'], $primary_id, $primary_id); |
| | | $checks = $app->db->queryAllRecords($qrystr, true $params); |
| | | $qrystr = "SELECT d.domain_id, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ip_address, d.ip_address) as `ip_address`, IF(d.parent_domain_id != 0 AND p.domain_id IS NOT NULL, p.ipv6_address, d.ipv6_address) as `ipv6_address` FROM `web_domain` as d LEFT JOIN `web_domain` as p ON (p.domain_id = d.parent_domain_id) WHERE (CONCAT(d.subdomain, '.', d.domain) = ?" . $additional_sql2 . ") AND d.server_id = ? AND d.domain_id != ?" . ($primary_id ? " AND d.parent_domain_id != ?" : ""); |
| | | $params = array_merge(array($domain_name), $domain_params, array($domain['server_id'], $primary_id, $primary_id)); |
| | | $checks = $app->db->queryAllRecords($qrystr, true, $params); |
| | | if(is_array($checks) && !empty($checks)){ |
| | | foreach($checks as $check){ |
| | | if($domain['ip_address'] == '*') return false; |