Hanno Böck To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/ Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. */ require_once('inc/base.php'); require_once('inc/security.php'); require_once('class/domain.php'); require_role(ROLE_SYSTEMUSER); require_once('dnsinclude.php'); $section = 'dns_dns'; $data = array(); $type = NULL; $dyndns = false; $dyndns_accounts = array(); foreach (get_dyndns_accounts() AS $t) { $dyndns_accounts[$t['id']] = $t['handle']; } if (isset($_REQUEST['type']) && $_REQUEST['type'] == "dyndns") { $_REQUEST['type'] = 'a'; $dyndns = true; } $new = false; if ($_REQUEST['id'] == 'new') { $new = true; $data = blank_dns_record($_REQUEST['type']); $domain = new Domain((int) $_REQUEST['domain']); $domain->ensure_userdomain(); $type = $_REQUEST['type']; if (! in_array($type, $valid_record_types)) system_failure('Ungültiger Record-Typ!'); $data['domain'] = $domain->id; if ($dyndns) $data['ttl'] = 120; } if (! $new) { $data = get_dns_record($_REQUEST['id']); $type = $data['type']; $dyndns = isset($data['dyndns']); $domain = new Domain((int) $data['domain']); $domain->ensure_userdomain(); if (! in_array($type, $valid_record_types)) system_failure('Ungültiger Record-Typ!'); } if ($new) title('DNS-Record erstellen'); else title('DNS-Record bearbeiten'); output('

Bitte beachten Sie: Um Ihnen auch ungewöhniche Konstellationen zu ermöglichen, erlaubt dieses Webinterface sehr großzügige Eintragungen, die eventuell nicht plausibel sind oder vom DNS-Server gar nicht so verstanden werden können. Wir können sicherheitskritische Einträge herausfiltern, jedoch nicht logische Fehler automatisch erkennen. Im Fehlerfall wird meistens Ihre gesamte Domain vom DNS-Server ausgeschlossen, so lange sich Fehler in der Konfiguration befinden. Sollten Sie hier also fehlerhafte Eintragungen machen, kann dies die Erreichbarkeit der betreffenden Domain im Ganzen stören.

'); output('

Record-Typ: '.strtoupper($type).'

'); $submit = 'Speichern'; if ($new) $submit = 'Anlegen'; $form = ''; if (! $dyndns && ($type == 'a' || $type == 'aaaa')) { $form .= ' '; } if ($type == 'ns') { $form .= ' '; } if ($type == 'ptr' || $type == 'cname') { $form .= ' '; } if ($type == 'spf' || $type == 'txt') { $form .= ' '; } if ($type == 'sshfp') { $rsadefault = ($data['spec'] == 1) ? ' selected="selected"' : ''; $dsadefault = ($data['spec'] == 2) ? ' selected="selected"' : ''; $form .= ' '; } if ($dyndns) { $form .= ' '.html_select('dyndns', $dyndns_accounts, $data['dyndns']).' '; } if ($type == 'mx') { $form .= ' '; } output(html_form('dns_record_edit', 'dns_record_save', "type={$type}&domain={$domain->id}&id={$_REQUEST['id']}", ' '.$form.'
 .'.$domain->fqdn.'

')); ?>