Hanno Böck This code is published under a 0BSD license. 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 = []; $type = null; $dyndns = false; $dyndns_accounts = []; foreach (get_dyndns_accounts() as $t) { $dyndns_accounts[$t['id']] = $t['handle']; } if (isset($_REQUEST['type']) && $_REQUEST['type'] == "dyndns") { $_REQUEST['type'] = 'a'; $dyndns = true; } if (isset($_REQUEST['type']) && $_REQUEST['type'] == "dyndns_aaaa") { $_REQUEST['type'] = 'aaaa'; $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'); } if (strtoupper($type) == 'NS') { output('

Bitte beachten Sie: Das Ändern der DNS-Server für die Stammdomain wird nicht funktionieren. Bitte geben Sie unbedingt einen Hostname ein um eine Subdomain auf einen anderen DNS-Server zu delegieren.

'); } if (strtoupper($type) == 'MX' && domain_is_maildomain($domain->id)) { output('

Bitte beachten Sie: Wenn Sie die Mail-Verarbeitung auf Servern von '.$config['company_name'].' nicht nutzen möchten, sollten Sie die lokale Mail-Verarbeitung für diese Domain ausschalten.

'); } 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') { $algs = [ 1 => "RSA", 2 => "DSA", 3 => "ECDSA", 4 => "ED25519", ]; $option=""; foreach ($algs as $key => $alg) { $option .= '