| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <div class="container mt-3 py-4">
- <h2>Account</h2>
- <?php
- switch(Core::$user->level) {
- case User::LEVEL_BANNED:
- ?>
- <div class="alert alert-danger"><i class="fal fa-fw fa-exclamation-circle"></i> Your account has been banned. You will not be able to participate in any tests.</div>
- <?php
- break;
- case User::LEVEL_REGISTERED:
- ?>
- <div class="alert alert-warning"><i class="fal fa-fw fa-clock"></i> Your account is not verified. You need to submit proof of ID and get your account verified before you can participate in tests.</div>
- <?php
- break;
- case User::LEVEL_UNVERIFIED:
- ?>
- <div class="alert alert-warning"><i class="fal fa-fw fa-clock"></i> Your account is pending verification. You will be able to participate in tests once verified.</div>
- <?php
- break;
- case User::LEVEL_DEACTIVATED:
- ?>
- <div class="alert alert-info"><i class="fal fa-fw fa-info-circle"></i> Your account is deactivated. You will not be able to participate in any tests until you reactivate your account.</div>
- <?php
- break;
- }
- ?>
- <div class="row">
- <div class="col-lg-4 mb-3 mb-lg-0">
- <h3>Main Menu</h3>
- <div class="list-group mb-3">
- <?php
- foreach($links as $path => $text) {
- ?>
- <a class="list-group-item list-group-item-action" href="<?=htmlspecialchars($path)?>">
- <?=htmlspecialchars($text)?>
- </a>
- <?php
- }
- ?>
- </div>
- <h3>Actions</h3>
- <div class="list-group mb-3">
- <?php
- foreach($actions as $path => $text) {
- $text_class = preg_match("/delete/i", $text) ? "text-danger" : "";
- ?>
- <a class="list-group-item list-group-item-action <?=$text_class?>" href="<?=htmlspecialchars($path)?>">
- <?=htmlspecialchars($text)?>
- </a>
- <?php
- }
- ?>
- </div>
- </div>
- <div class="col-lg mb-3 mb-lg-0">
- <?php
- $has_to_do = !empty($users_pending_verification) || !empty($tests_pending_verification) || !empty($tests_remaining);
- if($has_to_do) {
- ?>
- <h3>To-Do</h3>
- <?php
- if($users_pending_verification) {
- $s = ($users_pending_verification == 1) ? "" : "s";
- ?>
- <div class="alert alert-info mb-3 d-flex flex-row justify-content-between">
- <div class="align-self-center">
- <i class="fal fa-fw fa-info-circle"></i> <?=number_format($users_pending_verification)?> user<?=$s?> to be verified.
- </div>
- <a class="btn btn-primary" href="/account/users?level=<?=User::LEVEL_UNVERIFIED?>">View</a>
- </div>
- <?php
- }
- if($tests_pending_verification) {
- $s = ($tests_pending_verification == 1) ? "" : "s";
- ?>
- <div class="alert alert-info mb-3 d-flex flex-row justify-content-between">
- <div class="align-self-center">
- <i class="fal fa-fw fa-info-circle"></i> <?=number_format($tests_pending_verification)?> test<?=$s?> to be verified.
- </div>
- <a class="btn btn-primary" href="/account/tests?status=<?=Test::STATUS_PENDING_VERIFICATION?>">View</a>
- </div>
- <?php
- }
- if($tests_remaining) {
- $s = ($tests_remaining == 1) ? "" : "s";
- ?>
- <div class="alert alert-info mb-3 d-flex flex-row justify-content-between">
- <div class="align-self-center">
- <i class="fal fa-fw fa-info-circle"></i> <?=number_format($tests_remaining)?> test<?=$s?> remaining.
- </div>
- <a class="btn btn-primary" href="/account/tests">View</a>
- </div>
- <?php
- }
- }
- if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
- ?>
- <div class="alert alert-danger">
- <p><i class="fas fa-info-circle"></i> <strong>IMPORTANT</strong></p>
- <?php
- if(is_null(Core::$user->terms_accepted)) {
- ?>
- <p><a href="/terms-and-conditions">Terms and Conditions</a> have been published.</p>
- <p>Our records show that you have not accepted the <a href="/terms-and-conditions">Terms and Conditions</a> on registration. Please take time to read our Terms and Conditions and then click Accept or Decline to continue.</p>
- <?php
- }
- else {
- ?>
- <p>Our records show that you have declined the <a href="/terms-and-conditions">Terms and Conditions</a>. If you have changed your mind, please click Accept to continue or Decline for other actions.</p>
- <?php
- }
- ?>
- <a class="btn btn-success" href="/account/accept-terms">Accept</a>
- <a class="btn btn-danger" href="/account/decline-terms">Decline</a>
- </div>
- <?php
- }
- ?>
- <h3>Useful Documents</h3>
- <div class="list-group mb-3">
- <a class="list-group-item list-group-item-action" href="/files/id_response.pdf">
- <i class="fal fa-fw fa-file-pdf"></i>
- ID Response for Testers
- </a>
- <a class="list-group-item list-group-item-action" href="/files/testing_methodology.pdf">
- <i class="fal fa-fw fa-file-pdf"></i>
- Age Verification Testing Methodology
- </a>
- <a class="list-group-item list-group-item-action" href="/files/machine_categories.pdf">
- <i class="fal fa-fw fa-file-pdf"></i>
- Machine Categories
- </a>
- <a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
- <i class="fal fa-fw fa-file-pdf"></i>
- Testing Procedure
- </a>
- </div>
- <h3>Referrals</h3>
- <div class="list-group mb-3">
- <div class="list-group-item d-flex justify-content-between">
- <span>
- <i class="fal fa-fw fa-users"></i>
- Users Referred:
- </span>
- <span><?=number_format(count($referrals))?></span>
- </div>
- <div class="list-group-item d-flex align-items-center justify-content-between">
- <span>
- <i class="fal fa-fw fa-external-link"></i>
- Referral Link:
- </span>
- <div class="input-group input-group-sm w-50">
- <input class="form-control w-auto" type="text" id="referral-link" readonly value="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" />
- <div class="input-group-append">
- <button class="btn btn-secondary" data-clipboard-target="#referral-link" data-toggle="tooltip" title="Copy to clipboard">
- <i class="fal fa-fw fa-clipboard"></i>
- <span class="sr-only">Copy to clipboard</span>
- </button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
|