account.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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">
  8. <i class="fal fa-fw fa-exclamation-circle"></i>
  9. <?=htmlspecialchars(_("Your account has been banned. You will not be able to participate in any tests."))?>
  10. </div>
  11. <?php
  12. break;
  13. case User::LEVEL_REGISTERED:
  14. ?>
  15. <div class="alert alert-warning">
  16. <i class="fal fa-fw fa-clock"></i>
  17. <?=htmlspecialchars(_("Your account is not verified. You need to submit proof of ID and get your account verified before you can participate in tests."))?>
  18. </div>
  19. <?php
  20. break;
  21. case User::LEVEL_UNVERIFIED:
  22. ?>
  23. <div class="alert alert-warning">
  24. <i class="fal fa-fw fa-clock"></i>
  25. <?=htmlspecialchars(_("Your account is pending verification. You will be able to participate in tests once verified."))?>
  26. </div>
  27. <?php
  28. break;
  29. case User::LEVEL_DEACTIVATED:
  30. ?>
  31. <div class="alert alert-info">
  32. <i class="fal fa-fw fa-info-circle"></i>
  33. <?=htmlspecialchars(_("Your account is deactivated. You will not be able to participate in any tests until you reactivate your account."))?>
  34. </div>
  35. <?php
  36. break;
  37. }
  38. ?>
  39. <div class="row">
  40. <div class="col-xl mb-3 mb-lg-0">
  41. <h3>
  42. <?=htmlspecialchars(_("Main Menu"))?>
  43. </h3>
  44. <div class="row">
  45. <?php
  46. foreach($icons as $icon) {
  47. ?>
  48. <div class="col-6 col-sm-4 text-center">
  49. <a class="btn btn-light btn-block mb-3 p-2" href="<?=htmlspecialchars($icon->url)?>">
  50. <?php
  51. if($icon->counter) {
  52. ?>
  53. <span class="fa-layers fa-fw fa-3x mb-2">
  54. <i class="fal fa-<?=htmlspecialchars($icon->icon)?>"></i>
  55. <span class="fa-layers-counter fa-layers-bottom-right"><?=number_format($icon->counter)?></span>
  56. </span>
  57. <?php
  58. }
  59. else {
  60. ?>
  61. <i class="fal fa-3x fa-<?=htmlspecialchars($icon->icon)?> mb-2"></i>
  62. <?php
  63. }
  64. ?>
  65. <br />
  66. <?=htmlspecialchars($icon->name)?>
  67. </a>
  68. </div>
  69. <?php
  70. }
  71. ?>
  72. </div>
  73. </div>
  74. <div class="col-xl mb-3 mb-lg-0">
  75. <?php
  76. if($to_do) {
  77. ?>
  78. <h3><?=htmlspecialchars(_("To-Do"))?></h3>
  79. <div class="row">
  80. <?php
  81. foreach($to_do as $icon) {
  82. ?>
  83. <div class="col-6 col-sm-4 text-center">
  84. <a class="btn btn-primary btn-block mb-3 p-2" href="<?=htmlspecialchars($icon->url)?>">
  85. <?php
  86. if($icon->counter) {
  87. ?>
  88. <span class="fa-layers fa-fw fa-3x mb-2">
  89. <i class="fal fa-<?=htmlspecialchars($icon->icon)?>"></i>
  90. <span class="fa-layers-counter fa-layers-bottom-right"><?=number_format($icon->counter)?></span>
  91. </span>
  92. <?php
  93. }
  94. else {
  95. ?>
  96. <i class="fal fa-3x fa-<?=htmlspecialchars($icon->icon)?> mb-2"></i>
  97. <?php
  98. }
  99. ?>
  100. <br />
  101. <?=htmlspecialchars($icon->name)?>
  102. </a>
  103. </div>
  104. <?php
  105. }
  106. ?>
  107. </div>
  108. <?php
  109. }
  110. if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
  111. ?>
  112. <div class="alert alert-danger">
  113. <p><i class="fas fa-info-circle"></i> <strong><?=htmlspecialchars(_("Important"))?></strong></p>
  114. <?php
  115. if(is_null(Core::$user->terms_accepted)) {
  116. ?>
  117. <p>
  118. <a href="/terms-and-conditions">Terms and Conditions</a> have been published.
  119. <?=sprintf(htmlspecialchars(_("%sTerms and Conditions%s have been published.")), "<a href=\"/terms-and-conditions\">", "</a>")?>
  120. </p>
  121. <p>
  122. <?=sprintf(htmlspecialchars(_("Our records show that you have not accepted the %sTerms and Conditions%s on registration. Please take time to read our Terms and Conditions and then click Accept or Decline to continue.")), '<a href="/terms-and-conditions">', '</a>')?>
  123. </p>
  124. <?php
  125. }
  126. else {
  127. ?>
  128. <p>
  129. <?=sprintf(htmlspecialchars(_("Our records show that you have declined the %sTerms and Conditions. If you have changed your mind, please click Accept to continue or Decline for other actions.")), '<a href="/terms-and-conditions">', '</a>')?>
  130. </p>
  131. <?php
  132. }
  133. ?>
  134. <a class="btn btn-success" href="/account/accept-terms"><?=htmlspecialchars(_("Accept"))?></a>
  135. <a class="btn btn-danger" href="/account/decline-terms"><?=htmlspecialchars(_("Decline"))?></a>
  136. </div>
  137. <?php
  138. }
  139. ?>
  140. <?php
  141. if(Core::$user->isCustomer() == false) {
  142. ?>
  143. <h3><?=htmlspecialchars(_("Useful Documents"))?></h3>
  144. <div class="list-group mb-3">
  145. <a class="list-group-item list-group-item-action" href="/files/id_response.pdf">
  146. <i class="fal fa-fw fa-file-pdf"></i>
  147. <?=htmlspecialchars(_("ID Response for Testers"))?>
  148. </a>
  149. <a class="list-group-item list-group-item-action" href="/files/testing_methodology.pdf">
  150. <i class="fal fa-fw fa-file-pdf"></i>
  151. <?=htmlspecialchars(_("Age Verification Testing Methodology"))?>
  152. </a>
  153. <a class="list-group-item list-group-item-action" href="/files/machine_categories.pdf">
  154. <i class="fal fa-fw fa-file-pdf"></i>
  155. <?=htmlspecialchars(_("Machine Categories"))?>
  156. </a>
  157. <a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
  158. <i class="fal fa-fw fa-file-pdf"></i>
  159. <?=htmlspecialchars(_("Testing Procedure"))?>
  160. </a>
  161. </div>
  162. <?php
  163. }
  164. ?>
  165. <h3><?=htmlspecialchars(_("Referrals"))?></h3>
  166. <div class="list-group mb-3">
  167. <div class="list-group-item d-flex justify-content-between">
  168. <span>
  169. <i class="fal fa-fw fa-users"></i>
  170. <?=htmlspecialchars(_("Users Referred"))?>:
  171. </span>
  172. <span><?=number_format(count($referrals))?></span>
  173. </div>
  174. <div class="list-group-item d-flex justify-content-between">
  175. <span>
  176. <i class="fal fa-fw fa-external-link"></i>
  177. <?=htmlspecialchars(_("Referral Link"))?>:
  178. </span>
  179. <span>
  180. <a href="#" data-clipboard-text="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" data-toggle="tooltip" data-title="<?=htmlspecialchars(_("Copy to clipboard"))?>">
  181. <i class="fal fa-fw fa-clipboard"></i>
  182. <?=htmlspecialchars(_("Copy to clipboard"))?>
  183. </a>
  184. </span>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </div>