account.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <h3>Actions</h3>
  60. <div class="row">
  61. <?php
  62. foreach($actions as $icon) {
  63. $button_class = preg_match("/delete/i", $icon->name) ? "btn-danger" : "btn-light";
  64. ?>
  65. <div class="col-6 col-sm-4 text-center">
  66. <a class="btn <?=$button_class?> btn-block mb-3 p-2" href="<?=htmlspecialchars($icon->url)?>">
  67. <?php
  68. if($icon->counter) {
  69. ?>
  70. <span class="fa-layers fa-fw fa-3x mb-2">
  71. <i class="fal fa-<?=htmlspecialchars($icon->icon)?>"></i>
  72. <span class="fa-layers-counter fa-layers-bottom-right"><?=number_format($icon->counter)?></span>
  73. </span>
  74. <?php
  75. }
  76. else {
  77. ?>
  78. <i class="fal fa-3x fa-<?=htmlspecialchars($icon->icon)?> mb-2"></i>
  79. <?php
  80. }
  81. ?>
  82. <br />
  83. <?=htmlspecialchars($icon->name)?>
  84. </a>
  85. </div>
  86. <?php
  87. }
  88. ?>
  89. </div>
  90. </div>
  91. <div class="col-xl mb-3 mb-lg-0">
  92. <?php
  93. if($to_do) {
  94. ?>
  95. <h3>To-Do</h3>
  96. <div class="row">
  97. <?php
  98. foreach($to_do as $icon) {
  99. ?>
  100. <div class="col-6 col-sm-4 text-center">
  101. <a class="btn btn-primary btn-block mb-3 p-2" href="<?=htmlspecialchars($icon->url)?>">
  102. <?php
  103. if($icon->counter) {
  104. ?>
  105. <span class="fa-layers fa-fw fa-3x mb-2">
  106. <i class="fal fa-<?=htmlspecialchars($icon->icon)?>"></i>
  107. <span class="fa-layers-counter fa-layers-bottom-right"><?=number_format($icon->counter)?></span>
  108. </span>
  109. <?php
  110. }
  111. else {
  112. ?>
  113. <i class="fal fa-3x fa-<?=htmlspecialchars($icon->icon)?> mb-2"></i>
  114. <?php
  115. }
  116. ?>
  117. <br />
  118. <?=htmlspecialchars($icon->name)?>
  119. </a>
  120. </div>
  121. <?php
  122. }
  123. ?>
  124. </div>
  125. <?php
  126. }
  127. if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
  128. ?>
  129. <div class="alert alert-danger">
  130. <p><i class="fas fa-info-circle"></i> <strong>IMPORTANT</strong></p>
  131. <?php
  132. if(is_null(Core::$user->terms_accepted)) {
  133. ?>
  134. <p><a href="/terms-and-conditions">Terms and Conditions</a> have been published.</p>
  135. <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>
  136. <?php
  137. }
  138. else {
  139. ?>
  140. <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>
  141. <?php
  142. }
  143. ?>
  144. <a class="btn btn-success" href="/account/accept-terms">Accept</a>
  145. <a class="btn btn-danger" href="/account/decline-terms">Decline</a>
  146. </div>
  147. <?php
  148. }
  149. ?>
  150. <h3>Useful Documents</h3>
  151. <div class="list-group mb-3">
  152. <a class="list-group-item list-group-item-action" href="/files/id_response.pdf">
  153. <i class="fal fa-fw fa-file-pdf"></i>
  154. ID Response for Testers
  155. </a>
  156. <a class="list-group-item list-group-item-action" href="/files/testing_methodology.pdf">
  157. <i class="fal fa-fw fa-file-pdf"></i>
  158. Age Verification Testing Methodology
  159. </a>
  160. <a class="list-group-item list-group-item-action" href="/files/machine_categories.pdf">
  161. <i class="fal fa-fw fa-file-pdf"></i>
  162. Machine Categories
  163. </a>
  164. <a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
  165. <i class="fal fa-fw fa-file-pdf"></i>
  166. Testing Procedure
  167. </a>
  168. </div>
  169. <h3>Referrals</h3>
  170. <div class="list-group mb-3">
  171. <div class="list-group-item d-flex justify-content-between">
  172. <span>
  173. <i class="fal fa-fw fa-users"></i>
  174. Users Referred:
  175. </span>
  176. <span><?=number_format(count($referrals))?></span>
  177. </div>
  178. <div class="list-group-item d-flex justify-content-between">
  179. <span>
  180. <i class="fal fa-fw fa-external-link"></i>
  181. Referral Link:
  182. </span>
  183. <span>
  184. <a href="#" data-clipboard-text="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" data-toggle="tooltip" data-title="Copy to clipboard">
  185. <i class="fal fa-fw fa-clipboard"></i>
  186. Copy to clipboard
  187. </a>
  188. </span>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>