diff --git a/includes/config.inc.php-dist b/includes/config.inc.php-dist index bc00616..8991b81 100644 --- a/includes/config.inc.php-dist +++ b/includes/config.inc.php-dist @@ -35,10 +35,18 @@ $templates[] = array( 'name' => 'Tuxis', 'owner' => 'username', # Set to 'public' to make it available to all users 'records' => array( - array( - 'name' => '', - 'type' => 'MX', - 'content' => '200 mx2.tuxis.nl') + array( + 'name' => '', + 'type' => 'MX', + 'content' => '200 mx2.tuxis.nl'), + array( + 'name' => '', + 'type' => 'A', + 'content' => '1.2.3.4'), + array( + 'name' => 'www', + 'type' => 'CNAME', + 'content' => '[zonename]') ) ); */ diff --git a/zones.php b/zones.php index 528710f..9215b1a 100644 --- a/zones.php +++ b/zones.php @@ -331,6 +331,7 @@ case "create": foreach ($template['records'] as $record) { $name = $record['name'] != '' ? join(Array($record['name'],'.',$zonename)) : $zonename; + $record['content'] = str_replace("[zonename]", $zonename, $record['content']); $zone->addRecord($name, $record['type'], $record['content']); }