inc/record.inc.php
changeset 170 391e744a1def
parent 169 41353c2e0c9f
child 171 2a10febd6af9
equal deleted inserted replaced
169:41353c2e0c9f 170:391e744a1def
   639  */
   639  */
   640 function domain_exists($domain)
   640 function domain_exists($domain)
   641 {
   641 {
   642 	global $db;
   642 	global $db;
   643 
   643 
   644 	if (is_valid_domain($domain)) {
   644 	if (is_valid_hostname_fqdn($domain)) {
   645 		$result = $db->query("SELECT id FROM domains WHERE name=".$db->quote($domain));
   645 		$result = $db->query("SELECT id FROM domains WHERE name=".$db->quote($domain));
   646 		if ($result->numRows() == 0) {
   646 		if ($result->numRows() == 0) {
   647 			return false;
   647 			return false;
   648 		} elseif ($result->numRows() >= 1) {
   648 		} elseif ($result->numRows() >= 1) {
   649 			return true;
   649 			return true;