account.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <div class="container mt-3 py-4">
  2. <h2>Account</h2>
  3. <?php
  4. switch(Core::$user->level) {
  5. case User::LEVEL_BANNED:
  6. ?>
  7. <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>
  8. <?php
  9. break;
  10. case User::LEVEL_REGISTERED:
  11. ?>
  12. <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>
  13. <?php
  14. break;
  15. case User::LEVEL_UNVERIFIED:
  16. ?>
  17. <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>
  18. <?php
  19. break;
  20. case User::LEVEL_DEACTIVATED:
  21. ?>
  22. <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>
  23. <?php
  24. break;
  25. }
  26. ?>
  27. <div class="row">
  28. <div class="col-xl mb-3 mb-lg-0">
  29. <h3>Main Menu</h3>
  30. <div class="row">
  31. <?php
  32. foreach($icons as $icon) {
  33. ?>
  34. <div class="col-6 col-sm-4 text-center">
  35. <a class="btn btn-light btn-block mb-3 p-2" href="<?=htmlspecialchars($icon->url)?>">
  36. <?php
  37. if($icon->counter) {
  38. ?>
  39. <span class="fa-layers fa-fw fa-3x mb-2">
  40. <i class="fal fa-<?=htmlspecialchars($icon->icon)?>"></i>
  41. <span class="fa-layers-counter fa-layers-bottom-right"><?=number_format($icon->counter)?></span>
  42. </span>
  43. <?php
  44. }
  45. else {
  46. ?>
  47. <i class="fal fa-3x fa-<?=htmlspecialchars($icon->icon)?> mb-2"></i>
  48. <?php
  49. }
  50. ?>
  51. <br />
  52. <?=htmlspecialchars($icon->name)?>
  53. </a>
  54. </div>
  55. <?php
  56. }
  57. ?>
  58. </div>
  59. </div>
  60. <div class="col-xl mb-3 mb-lg-0">
  61. <?php
  62. if($to_do) {
  63. ?>
  64. <h3>To-Do</h3>
  65. <div class="row">
  66. <?php
  67. foreach($to_do as $icon) {
  68. ?>
  69. <div class="col-6 col-sm-4 text-center">
  70. <a class="btn btn-primary btn-block mb-3 p-2" href="<?=htmlspecialchars($icon->url)?>">
  71. <?php
  72. if($icon->counter) {
  73. ?>
  74. <span class="fa-layers fa-fw fa-3x mb-2">
  75. <i class="fal fa-<?=htmlspecialchars($icon->icon)?>"></i>
  76. <span class="fa-layers-counter fa-layers-bottom-right"><?=number_format($icon->counter)?></span>
  77. </span>
  78. <?php
  79. }
  80. else {
  81. ?>
  82. <i class="fal fa-3x fa-<?=htmlspecialchars($icon->icon)?> mb-2"></i>
  83. <?php
  84. }
  85. ?>
  86. <br />
  87. <?=htmlspecialchars($icon->name)?>
  88. </a>
  89. </div>
  90. <?php
  91. }
  92. ?>
  93. </div>
  94. <?php
  95. }
  96. if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
  97. ?>
  98. <div class="alert alert-danger">
  99. <p><i class="fas fa-info-circle"></i> <strong>IMPORTANT</strong></p>
  100. <?php
  101. if(is_null(Core::$user->terms_accepted)) {
  102. ?>
  103. <p><a href="/terms-and-conditions">Terms and Conditions</a> have been published.</p>
  104. <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>
  105. <?php
  106. }
  107. else {
  108. ?>
  109. <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>
  110. <?php
  111. }
  112. ?>
  113. <a class="btn btn-success" href="/account/accept-terms">Accept</a>
  114. <a class="btn btn-danger" href="/account/decline-terms">Decline</a>
  115. </div>
  116. <?php
  117. }
  118. ?>
  119. <?php
  120. if(Core::$user->isCustomer() == false) {
  121. ?>
  122. <h3>Useful Documents</h3>
  123. <div class="list-group mb-3">
  124. <a class="list-group-item list-group-item-action" href="/files/id_response.pdf">
  125. <i class="fal fa-fw fa-file-pdf"></i>
  126. ID Response for Testers
  127. </a>
  128. <a class="list-group-item list-group-item-action" href="/files/testing_methodology.pdf">
  129. <i class="fal fa-fw fa-file-pdf"></i>
  130. Age Verification Testing Methodology
  131. </a>
  132. <a class="list-group-item list-group-item-action" href="/files/machine_categories.pdf">
  133. <i class="fal fa-fw fa-file-pdf"></i>
  134. Machine Categories
  135. </a>
  136. <a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
  137. <i class="fal fa-fw fa-file-pdf"></i>
  138. Testing Procedure
  139. </a>
  140. </div>
  141. <?php
  142. }
  143. ?>
  144. <h3>Referrals</h3>
  145. <div class="list-group mb-3">
  146. <div class="list-group-item d-flex justify-content-between">
  147. <span>
  148. <i class="fal fa-fw fa-users"></i>
  149. Users Referred:
  150. </span>
  151. <span><?=number_format(count($referrals))?></span>
  152. </div>
  153. <div class="list-group-item d-flex justify-content-between">
  154. <span>
  155. <i class="fal fa-fw fa-external-link"></i>
  156. Referral Link:
  157. </span>
  158. <span>
  159. <a href="#" data-clipboard-text="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" data-toggle="tooltip" data-title="Copy to clipboard">
  160. <i class="fal fa-fw fa-clipboard"></i>
  161. Copy to clipboard
  162. </a>
  163. </span>
  164. </div>
  165. </div>
  166. </div>
  167. </div>
  168. </div>