summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dns.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/dns.php b/dns.php
index fa4a1fc..71ad361 100644
--- a/dns.php
+++ b/dns.php
@@ -3,6 +3,9 @@ ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
error_reporting(E_ALL);
+$zoneroot = "/var/bind/pri/";
+$zonesuffix = ".zone";
+
function sshrun($command) {
$host = "misc.tghost.co.uk";
$user = "bladns.net";
@@ -20,9 +23,6 @@ function sshrun($command) {
}
function getzone($domain, $password) {
- $zoneroot = "/var/bind/pri/";
- $zonesuffix = ".zone";
-
if (!preg_match('/^[0-9A-Za-z\.\-]*$/', $_POST['domain'])) {
die("invalid domain");
}
@@ -40,9 +40,6 @@ function getzone($domain, $password) {
}
function writezone($domain, $password, $zonetext) {
- $zoneroot = "/var/bind/pri/";
- $zonesuffix = ".zone";
-
if (!preg_match('/^[0-9A-Za-z\.\-]*$/', $_POST['domain'])) {
die("invalid domain");
}