servnest/pg-view/auth/index.php

33 lines
1.6 KiB
PHP

<?php displayIndex(); ?>
<p>
<?php if (isset($_SESSION['id'])) {
echo match ($_SESSION['type']) {
'testing' => _('You are currently using a testing account.'),
'approved' => _('You are currently using an approved account.'),
} . ' ' . sprintf(_('It\'s internal ID is %s.'), '<small><code>' . $_SESSION['id'] . '</code></small>');
} else {
echo _('You are not logged in.');
} ?>
</p>
<h2><?= _('Account types') ?></h2>
<dl>
<dt><span aria-hidden="true">⏳ </span><em><?= _('Testing') ?></em></dt>
<dd>
<?= _('It\'s the default account type, with limited capabilities in order to avoid abuses:') ?>
<ul>
<li><strong><?= _('May be deleted anytime') ?></strong></li>
<li><?= sprintf(_('%s of SFTP quota'), ((CONF['ht']['user_quota_testing'] >> 30) >= 1) ? CONF['ht']['user_quota_testing'] >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : CONF['ht']['user_quota_testing'] >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?></li>
<li><?= _('Let\'s Encrypt certificate from the staging environment (not trusted by clients)') ?></li>
</ul>
</dd>
<dt><span aria-hidden="true">👤 </span><em><?= _('Approved') ?></em></dt>
<dd>
<?= _('It was originally a testing account, but has been approved by an administrator, and is suited for stable usecases:') ?>
<ul>
<li><?= sprintf(_('%s of SFTP quota'), ((CONF['ht']['user_quota_approved'] >> 30) >= 1) ? CONF['ht']['user_quota_approved'] >> 30 . ' ' . _('<abbr title="gibibyte">GiB</abbr>') : CONF['ht']['user_quota_approved'] >> 20 . ' ' . _('<abbr title="mebibyte">MiB</abbr>')) ?></li>
<li><?= _('Stable Let\'s Encrypt certificates') ?></li>
</ul>
</dd>
</dl>