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($_GET['do'])) {
    switch ($_GET['do']) {
        case 'add':
        case 'delete':
        case 'edit':
            $do = $_GET['do'];
            break;
        default:
            unset($_GET['do']);
    }
}
if (!isset($_GET['do'])) {
    ?>
<div id="mxregs">
  <div id="header">
    <h1>Mail eXchange</h1>
    <p>Here you can add, edit or delete your Mail eXchange registers</p>
    <hr />
  </div>
  <form action="panel.php?action=mx&do=add" method="post">
    <div id="addnew">
      <h1>Add a new register</h1>
      <div id="host"><input type="text" name="host" /><span>.<?php 
Example #2
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>
Example #3
0
    exit;
}
switch ($_GET['t']) {
    case 'NS':
    case 'A':
    case 'AAAA':
    case 'CNAME':
    case 'TXT':
        $type = $_GET['t'];
        break;
    default:
        exit;
}
require_once 'zoneparser.php';
require_once 'config.php';
$zone = new ZoneParser($config['zones_path'] . '/' . $domain['name'] . '.zone');
if (isset($_GET['do'])) {
    switch ($_GET['do']) {
        case 'add':
        case 'delete':
        case 'edit':
            $do = $_GET['do'];
            break;
        default:
            unset($_GET['do']);
    }
}
if (!isset($_GET['do'])) {
    ?>
  <div id="reglist">
    <div id="header">