<?php
require_once('inc/base.php');
require_once('inc/security.php');
require_once('class/domain.php');
require_role(ROLE_CUSTOMER);
require_once('dnsinclude.php');
$section = 'dns_dns';
$data = array();
$type = NULL;
$new = false;
if ($_REQUEST['id'] == 'new')
{
$new = true;
$data = blank_dns_record($_REQUEST['type']);
$domain = new Domain((int) $_REQUEST['dom']);
$type = $_POST['type'];
if (! in_array($type, $valid_record_types))
system_failure('Ungültiger Record-Typ!');
$data['domain'] = $domain->id;
}
if (! $new)
{
$data = get_dns_record($_REQUEST['id']);
$type = $data['type'];
if (! in_array($type, $valid_record_types))
system_failure('Ungültiger Record-Typ!');
}
if ($new)
$output .= '<h3>DNS-Record erstellen</h3>';
else
$output .= '<h3>DNS-Record bearbeiten</h3>';
$action = 'create';
if (! $new)
$action = 'edit&id='.(int)$_REQUEST['id'];
$submit = 'Speichern';
if ($new)