Example #1
0
<?php

if (!isset($domain['id'])) {
    exit;
}
require_once 'zoneparser.php';
require_once 'config.php';
$zone = new ZoneParser($config['zones_path'] . '/' . $domain['name'] . '.zone');
if (isset($_POST['ttl']) && isset($_POST['ns']) && isset($_POST['email']) && isset($_POST['refresh']) && isset($_POST['retry']) && isset($_POST['expiry']) && isset($_POST['min'])) {
    $zone->SetTTL($_POST['ttl']);
    $zone->SetSOA($_POST['ns'], $_POST['email'], $_POST['refresh'], $_POST['retry'], $_POST['expiry'], $_POST['min']);
    $zone->ApplyChanges();
    ?>
  <div id="confirmation_message">SOA register changed successfuly</div>
<?php 
}
$ttl = $zone->GetRecords('TTL');
$soa = $zone->GetRecords('SOA');
?>
<div id="soa">
  <div id="header">
    <h1>Domain SOA values</h1>
    <p>Here you can change the SOA values for your domain. This is the most important register of each domain, allowing to set the main nameserver, root email address and time values for each option.</p>
    <hr />
  </div>
  <div id="content">
    <form name="soa" action="panel.php?action=soa" method="post" onsubmit="return checkSOA();">
      <div id="ttl"><span>Default domain TTL</span><input type="text" name="ttl" value="<?php 
echo $ttl;
?>
" /></div>