servnest/pg-view/ns/index.php

34 lines
694 B
PHP

<?php declare(strict_types=1); ?>
<p>
<?= _('This service allows to host and manage DNS records inside a DNS zone.') ?>
</p>
<?php displayIndex(); ?>
<h2><?= _('Currently hosted zones') ?></h2>
<?php
$zones = query('select', 'zones', ['username' => $_SESSION['id'] ?? ''], ['zone']);
if ($zones === [])
echo '<p>∅<p>' . LF;
else {
echo '<ul>' . LF;
foreach ($zones as $zone)
echo ' <code><li>' . $zone . '</li></code>' . LF;
echo '</ul>' . LF;
}
?>
<h2><?= _('Name servers') ?></h2>
<p><?= _('A zone hosted on this service is served by these name servers:') ?></p>
<ul>
<?php
foreach (CONF['ns']['servers'] as $server)
echo ' <li><code>' . $server . '</code></li>';
?>
</ul>