NULL,
'approved' => match ($_SESSION['type']) {
'approved' => NULL,
default => output(403, 'The current account type is not allowed to register in this suffix.'),
},
default => output(403, 'This suffix is not open to registration.'),
};
$domain = formatAbsoluteDomain($_POST['subdomain'] . '.' . $_POST['suffix']);
if (in_array($_POST['subdomain'], explode(LF, file_get_contents(ROOT_PATH . '/pg-act/reg/reserved.txt')), true))
message('❌ ' . _('This domain is reserved.'));
$message = '
' . sprintf(_('This domain was registered from %s to %s.'), '', '') . ' ';
if (new DateTimeImmutable('now', new DateTimeZone('UTC')) < $new_registration_date) {
$blocked = true;
$message .= sprintf(_('This blocks it until %s.'), '') . ' ❌';
} else {
$message .= sprintf(_('This had blocked it until %s.'), '');
}
$message .= '
';
}
$message .= '
';
$registration_data = query('select', 'registry', ['domain' => $domain]);
if ($registration_data !== [])
$message .= sprintf(_('This domain is already registered, since %s.'), '');
if ($blocked OR $registration_data !== [])
message($message);
if ($_POST['action'] !== 'register')
message($message . ' ✔️ ' . _('This domain is open to registration!'));
function message($message) {
output(200, data: [
'message' => '