servnest/pg-view/reg/index.php

80 lines
2.6 KiB
PHP

<?php declare(strict_types=1); ?>
<p>
<?= sprintf(_('This domain name registry allows to register domains ending with <code>%1$s</code>, for instance <code><em>domain</em>%1$s</code>.'), '.' . key(CONF['reg']['suffixes'])) ?>
</p>
<?php displayIndex(); ?>
<h2><?= _('Currently registered domains') ?></h2>
<?php
$domains = query('select', 'registry', ['username' => $_SESSION['id'] ?? ''], ['domain']);
if ($domains === [])
echo '<p>∅</p>' . LF;
else {
echo '<ul>' . LF;
foreach ($domains as $domain)
echo ' <code><li>' . $domain . '</li></code>' . LF;
echo '</ul>' . LF;
}
?>
<section>
<h2>Current subdomain registration policy</h2>
<dl>
<dt><?= _('Both <span aria-hidden="true">⏳ </span><em>testing</em> and <span aria-hidden="true">👤 </span><em>approved</em> accounts can register a domain under these suffixes:') ?></dt>
<dd>
<ul>
<?php
foreach (CONF['reg']['suffixes'] as $suffix => $condition)
if ($condition === 'all')
echo '<li><code>' . $suffix . ' </code></li>' . LF;
if (!in_array('all', CONF['reg']['suffixes'], true))
echo '<li>∅</li>' . LF;
?>
</ul>
</dd>
<dt><?= _('Only <span aria-hidden="true">👤 </span><em>approved</em> accounts can register a domain under these suffixes:') ?></dt>
<dd>
<ul>
<?php
foreach (CONF['reg']['suffixes'] as $suffix => $condition)
if ($condition === 'approved')
echo '<li><code>' . $suffix . ' </code></li>' . LF;
if (!in_array('approved', CONF['reg']['suffixes'], true))
echo '<li>∅</li>' . LF;
?>
</ul>
</dd>
<dt><?= _('Nobody can register a domain under these suffixes:') ?></dt>
<dd>
<ul>
<?php
foreach (CONF['reg']['suffixes'] as $suffix => $condition)
if ($condition === 'none')
echo '<li><code>' . $suffix . ' </code></li>' . LF;
if (!in_array('none', CONF['reg']['suffixes'], true))
echo '<li>∅</li>' . LF;
?>
</ul>
</dd>
</dl>
</section>
<section>
<h2><?= _('Automatic updates from child zone') ?></h2>
<h3><?= _('CSYNC records') ?></h3>
<p>
<?= _('The registry can synchronize NS records from the child zone if a CSYNC record is present at the apex of the child zone, has flags <code>1</code> and type bit map <code>NS</code>, and can be DNSSEC-validated. Others values are not supported.') ?>
</p>
<h3><?= _('DNSSEC and DS records') ?></h3>
<p>
<?= _('Once DNSSEC has been manually enabled through the current interface, the delegated zone can publish a CDS record in order to update the DS record in the registry. A single CDS record with value <code>0 0 0 0</code> tells the registry to disable DNSSEC. Using a CDS record to enable DNSSEC is not supported.') ?>
</p>
</section>