| | |
| | | * End Form configuration |
| | | ******************************************/ |
| | | |
| | | require_once('../../lib/config.inc.php'); |
| | | require_once('../../lib/app.inc.php'); |
| | | require_once '../../lib/config.inc.php'; |
| | | require_once '../../lib/app.inc.php'; |
| | | |
| | | //* Check permissions for module |
| | | $app->auth->check_module_permissions('client'); |
| | |
| | | |
| | | function onBeforeDelete() { |
| | | global $app; $conf; |
| | | |
| | | |
| | | //* load language file |
| | | $lng_file = 'lib/lang/'.$_SESSION['s']['language'].'.lng'; |
| | | include($lng_file); |
| | | |
| | | include $lng_file; |
| | | |
| | | /* |
| | | * We can only delete domains if they are NOT in use |
| | | */ |
| | | $domain = $this->dataRecord['domain']; |
| | | |
| | | $sql = "SELECT domain_id FROM mail_domain WHERE domain = '" . $app->db->quote($domain) . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | $sql = "SELECT id FROM dns_soa WHERE origin = ?"; |
| | | $res = $app->db->queryOneRecord($sql, $domain."."); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in dnsuse']); |
| | | } |
| | | |
| | | $sql = "SELECT id FROM dns_slave WHERE origin = ?"; |
| | | $res = $app->db->queryOneRecord($sql, $domain."."); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in dnsslaveuse']); |
| | | } |
| | | |
| | | $sql = "SELECT domain_id FROM mail_domain WHERE domain = ?"; |
| | | $res = $app->db->queryOneRecord($sql, $domain); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in mailuse']); |
| | | } |
| | | |
| | | $sql = "SELECT domain_id FROM web_domain WHERE domain = '" . $app->db->quote($domain) . "'"; |
| | | $res = $app->db->queryOneRecord($sql); |
| | | |
| | | $sql = "SELECT domain_id FROM web_domain WHERE (domain = ? AND type IN ('alias', 'vhost', 'vhostalias')) OR (domain LIKE ? AND type IN ('subdomain', 'vhostsubdomain'))"; |
| | | $res = $app->db->queryOneRecord($sql, $domain, '%.' . $domain); |
| | | if (is_array($res)){ |
| | | $app->error($wb['error_domain_in webuse']); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | $page = new page_action; |
| | | $page->onDelete(); |
| | | |
| | | ?> |
| | | ?> |