servnest/pg-view/auth/index.php

35 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2023-07-17 19:15:18 +00:00
<?php declare(strict_types=1); ?>
<?php displayIndex(); ?>
<h2 id="type"><?= _('Account type') ?></h2>
2022-11-07 18:40:40 +00:00
<p>
<?php
if (isset($_SESSION['id']))
echo match ($_SESSION['type']) {
'testing' => _('You are currently using a <strong>testing</strong> account.'),
'approved' => _('You are currently using an <strong>approved</strong> account.'),
};
else
echo _('You are not logged in.');
?>
2022-11-07 18:40:40 +00:00
</p>
<p>
<?= _('When an account is created, it\'s a <em>testing</em> account. A testing account is only temporary and with limited capabilities on the services. Once the account is validated by using an approval key requested to an administrator, it becomes an <em>approved</em> account.') ?>
</p>
<h2><?= _('Rate limit') ?></h2>
<details>
<?php $tokens = isset($_SESSION['id']) ? rateLimitAccount(0) : MAX_ACCOUNT_TOKENS; ?>
<summary><?= sprintf(_('Your account is at %s%% of the rate limit.'), '<span title="' . abs($tokens-MAX_ACCOUNT_TOKENS) . '/' . MAX_ACCOUNT_TOKENS . '">' . abs(intval($tokens / MAX_ACCOUNT_TOKENS * 100)-100) . '</title>') ?></summary>
<p>
<?= _('Most of the form submissions bring you closer to the rate limit. If you reach it, you need to wait in order to be able to submit forms again.') ?>
</p>
</details>
<h2><?= _('Internal ID') ?></h2>
2022-11-07 18:40:40 +00:00
<p><?= sprintf(_('The current account\'s internal ID is %s.'), '<small><code>' . ($_SESSION['id'] ?? '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef') . '</code></small>') ?></p>