servnest/pg-view/reg/index.php

61 lines
1.5 KiB
PHP
Raw Normal View History

2022-08-11 14:38:45 +00:00
<p>
2023-01-23 00:14:59 +00:00
<?= 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'])) ?>
2022-08-11 14:38:45 +00:00
</p>
2022-09-14 11:30:45 +00:00
<?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>';
?>
</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>';
?>
</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>';
?>
</ul>
</dd>
</dl>
</section>