<?php
require_once('inc/base.php');
require_once('inc/icons.php');
require_once('inc/security.php');
require_role(ROLE_SYSTEMUSER);
require_once('dnsinclude.php');
$domains = get_domain_list(($_SESSION['customerinfo']['customerno'] ?? null), $_SESSION['userinfo']['uid']);
title('DNS-Records');
output('<p>Hier sehen Sie eine Übersicht über die angelegten DNS-records zu Ihren Domains.</p>');
$output .= '<table><tr><th>Domainname</th><th>Manuelle records</th><th>Automatische records</th><th>Status</th></tr>';
DEBUG($domains);
$external_domains = false;
$unused_dns = false;
foreach ($domains as $dom) {
if ($dom->provider != 'terions') {
$external_domains = true;
}
$style="";
if ($dom->dns == 0) {
if (strstr($dom->domainname, '.')) {
$output .= '<tr style="color: #999;"><td>'.$dom->fqdn.'</td><td>---</td><td>---</td><td>Subdomain ohne eigene DNS-Zone</td></tr>';
} else {
$output .= '<tr style="color: #999;"><td>'.$dom->fqdn.'</td><td>---</td><td>---</td><td>'.icon_disabled('DNS-Server ausgeschaltet').' Es wird ein externer DNS-Server benutzt<br />'.internal_link('save', icon_add().' Lokalen DNS-Server aktivieren', "dom={$dom->id}&dns=1").'</td></tr>';
}
continue;
}
$records = get_domain_records($dom->id);