BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 4.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?php
  2. #declare(strict_types = 1);
  3. enforce_login();
  4. $ENV = ENV::go();
  5. include SERVER_ROOT.'/sections/staff/functions.php';
  6. View::show_header(
  7. 'Staff',
  8. 'vendor/easymde.min',
  9. 'vendor/easymde.min'
  10. );
  11. $SupportStaff = get_support();
  12. list($FrontLineSupport, $ForumStaff, $Staff) = $SupportStaff;
  13. ?>
  14. <div>
  15. <h2 class="header">
  16. <?= $ENV->SITE_NAME ?>
  17. Staff
  18. </h2>
  19. <div class="box pad" style="padding: 0px 10px 10px 10px;">
  20. <h3>Contact Staff</h3>
  21. <div id="below_box">
  22. <p>
  23. If you are looking for help with a general question,
  24. we appreciate it if you would only message through the staff inbox,
  25. where we can all help you.
  26. </p>
  27. <p>
  28. You can do that by
  29. <strong><a data-toggle-target="#compose">sending a message to the Staff Inbox</a></strong>.
  30. </p>
  31. </div>
  32. <?php View::parse('generic/reply/staffpm.php', array('Hidden' => true)); ?>
  33. <?php if ($FrontLineSupport) { ?>
  34. </div>
  35. <div class="box pad">
  36. <h3 id="fls">First-Line Support</h3>
  37. <p><strong>These users are not official staff members.</strong> They are users who have volunteered their time to
  38. help people in need. Please treat them with respect, and read <a
  39. href="wiki.php?action=article&amp;id=260">this</a> before contacting them.</p>
  40. <table class="staff" width="100%">
  41. <tr class="colhead">
  42. <td style="width: 130px;">Username</td>
  43. <td style="width: 130px;">Last seen</td>
  44. <td><strong>Support for</strong></td>
  45. </tr>
  46. <?php
  47. foreach ($FrontLineSupport as $Support) {
  48. list($ID, $Class, $Username, $Paranoia, $LastAccess, $SupportFor) = $Support;
  49. make_staff_row($ID, $Paranoia, $Class, $LastAccess, $SupportFor);
  50. } ?>
  51. </table>
  52. <?php }
  53. if ($ForumStaff) { ?>
  54. </div>
  55. <div class="box pad" style="padding: 0px 10px 10px 10px;">
  56. <h3 id="forum_mods">Forum Moderators</h3>
  57. <p>Forum Moderators are users who have been promoted to help moderate the forums. They can only help with
  58. forum-oriented questions.</p>
  59. <table class="staff" width="100%">
  60. <tr class="colhead">
  61. <td style="width: 130px;">Username</td>
  62. <td style="width: 130px;">Last seen</td>
  63. <td><strong>Remark</strong></td>
  64. </tr>
  65. <?php
  66. foreach ($ForumStaff as $Support) {
  67. list($ID, $Class, $Username, $Paranoia, $LastAccess, $SupportFor) = $Support;
  68. make_staff_row($ID, $Paranoia, $Class, $LastAccess, $SupportFor);
  69. } ?>
  70. </table>
  71. <?php
  72. }
  73. $CurClass = 0;
  74. $CloseTable = false;
  75. foreach ($Staff as $StaffMember) {
  76. list($ID, $Class, $ClassName, $Username, $Paranoia, $LastAccess, $Remark) = $StaffMember;
  77. if ($Class != $CurClass) { // Start new class of staff members
  78. if ($CloseTable) {
  79. $CloseTable = false;
  80. // the "\t" and "\n" are used here to make the HTML look pretty
  81. echo "\t\t</table>\n\t\t<br />\n";
  82. }
  83. $CurClass = $Class;
  84. $CloseTable = true;
  85. $DevDiv = false;
  86. $AdminDiv = false;
  87. $HTMLID = '';
  88. switch ($ClassName) {
  89. case 'Moderator':
  90. printSectionDiv("Moderators");
  91. $HTMLID = 'mods';
  92. break;
  93. case 'Developer':
  94. $HTMLID = 'devs';
  95. break;
  96. case 'Lead Developer':
  97. $HTMLID = 'lead_devs';
  98. break;
  99. case 'System Administrator':
  100. $HTMLID = 'sys_admins';
  101. break;
  102. case 'Administrator':
  103. $HTMLID = 'admins';
  104. break;
  105. case 'Sysop':
  106. $HTMLID = 'sysops';
  107. break;
  108. default:
  109. $HTMLID = '';
  110. }
  111. switch ($ClassName) {
  112. case 'Developer':
  113. case 'Lead Developer':
  114. if (!$DevDiv) {
  115. printSectionDiv("Development");
  116. $DevDiv = true;
  117. }
  118. break;
  119. case 'System Administrator':
  120. case 'Administrator':
  121. case 'Sysop':
  122. if (!$AdminDiv) {
  123. printSectionDiv("Administration");
  124. $AdminDiv = true;
  125. }
  126. }
  127. if ($HTMLID != 'mods') {
  128. echo "\t\t<h3 style=\"font-size: 17px;\" id=\"$HTMLID\"><i>".$ClassName."s</i></h3>\n";
  129. } else {
  130. echo "\t\t<h2 style='text-align: left'>" . $ClassName . "s</h2>\n";
  131. } ?>
  132. <table class="staff" width="100%">
  133. <tr class="colhead">
  134. <td style="width: 130px;">Username</td>
  135. <td style="width: 130px;">Last seen</td>
  136. <td><strong>Remark</strong></td>
  137. </tr>
  138. <?php
  139. } // End new class header
  140. $HiddenBy = 'Hidden by staff member';
  141. // Display staff members for this class
  142. make_staff_row($ID, $Paranoia, $Class, $LastAccess, $Remark, $HiddenBy);
  143. } ?>
  144. </table>
  145. </div>
  146. </div>
  147. <?php View::show_footer();