<?php
/*
This file belongs to the Webinterface of schokokeks.org Hosting
Written by schokokeks.org Hosting, namely
Bernd Wurst <bernd@schokokeks.org>
Hanno Böck <hanno@schokokeks.org>
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/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>Hostname</th><th>Typ</th><th>IP-Adresse/Inhalt</th><th>TTL</th><th> </th></tr>
//';
$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);