servnest/pg-view/reg/register.php

39 lines
1.4 KiB
PHP

<p>
<?= _('Register a new domain on your account.') ?>
</p>
<p>
<?= sprintf(_('The subdomain can only contain %1$s, %2$s and %3$s, and must be between 4 and 63 characters. It can\'t have an hyphen (%3$s) in first, last or both third and fourth position.'), '<abbr title="abcdefghijklmnopqrstuvwxyz"><code>a</code>-<code>z</code></abbr>', '<abbr title="0123456789"><code>0</code>-<code>9</code></abbr>', '<code>-</code>') ?>
</p>
<form method="post">
<fieldset>
<legend><?= _('Domain') ?></legend>
<div>
<label for="subdomain"><?= _('Subdomain') ?></label>
<br>
<input id="subdomain" pattern="<?= SUBDOMAIN_REGEX ?>" required="" placeholder="servnest" name="subdomain" type="text" value="<?= $data['domain'] ?? '' ?>">
</div>
<div>
<label for="suffix"><?= _('Suffix') ?></label>
<br>
<select required="" name="suffix" id="suffix">
<?php
foreach (CONF['reg']['suffixes'] as $suffix => $availability) {
if ($availability === 'none')
continue;
echo ' <option' . (($availability === 'approved' AND ($_SESSION['type'] ?? '') !== 'approved') ? ' disabled=""' : '') . ' value="' . $suffix . '">.' . $suffix . '</option>' . LF;
}
?>
</select>
</div>
</fieldset>
<button type="submit" name="action" value="check">👁️ <?= _('Check availability') ?></button>
<br>
<button type="submit" name="action" value="register">🔗 <?= _('Register') ?></button>
</form>
<section>
<?= $data['message'] ?? '' ?>
</section>