Ver Fonte

Use string instead of Knot template in share/

Miraty há 3 anos atrás
pai
commit
a8af13b781
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      public/ns/zone.php

+ 3 - 2
public/ns/zone.php

@@ -24,8 +24,9 @@ if (isset($_POST['domain']) AND isset($_SESSION['username'])) {
 	$stmt->execute();
 	$stmt->execute();
 
 
 	$knotZonePath = KNOT_ZONES_PATH . "/" . $_POST['domain'] . "zone";
 	$knotZonePath = KNOT_ZONES_PATH . "/" . $_POST['domain'] . "zone";
-	$knotZone = file_get_contents(NIVER_TEMPLATE_PATH . "/knot.template");
-	$knotZone = preg_replace("/DOMAIN/", $_POST['domain'], $knotZone);
+	$knotZone = $_POST['domain'] . ' 3600 SOA ns1.niver.test. admin.niver.test. 1 21600 7200 3628800 3600
+' . $_POST['domain'] . ' 86400 NS ns1.niver.test.
+';
 	file_put_contents($knotZonePath, $knotZone);
 	file_put_contents($knotZonePath, $knotZone);
 	chmod($knotZonePath, 0660);
 	chmod($knotZonePath, 0660);