forked from PokemonAbsolute/Absolute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstaff.php
90 lines (81 loc) · 2.44 KB
/
staff.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
require_once 'core/required/layout_top.php';
$Staff_Categories = [
[ 'Rank' => 'Administrator' ],
[ 'Rank' => 'Developer' ],
[ 'Rank' => 'Super Moderator' ],
[ 'Rank' => 'Moderator' ],
[ 'Rank' => 'Bot' ],
[ 'Rank' => 'Chat Moderator' ],
];
?>
<div class='panel content'>
<div class='head'>Staff List</div>
<div class='body' style='padding: 5px;'>
<div class='description' style='margin: 0px auto 5px'>
All members of Absolute's staff team are listed below.<br />
If you require_once assistance with something, please don't hesitate to contact one of them.
</div>
<div class='row' style='display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center;'>
<?php
foreach ( $Staff_Categories as $Staff_Category )
{
try
{
$Fetch_Staff = $PDO->prepare("SELECT `ID`, `Username`, `Avatar`, `Rank`, `Last_Active`, `Staff_Message` FROM `users` WHERE `Rank` = ? ORDER BY `id` ASC");
$Fetch_Staff->execute([ $Staff_Category['Rank'] ]);
$Fetch_Staff->setFetchMode(PDO::FETCH_ASSOC);
$Staff_Members = $Fetch_Staff->fetchAll();
}
catch( PDOException $e )
{
HandleError($e);
}
if ( !$Staff_Members )
continue;
echo "
<div style='flex-basis: 100%;'>
<h3 class='" . strtolower($Staff_Category['Rank']) . "'>{$Staff_Category['Rank']}s</h3>
</div>
";
foreach ( $Staff_Members as $User_Key => $User_Val )
{
$Staff_Data = $User_Class->FetchUserData($User_Val['ID']);
$Staff_Username = $User_Class->DisplayUsername($User_Val['ID'], true, true, true);
echo "
<table class='border-gradient' style='flex-basis: 280px; margin: 3px;'>
<tbody>
<tr>
<td rowspan='2' style='width: 100px;'>
<img src='{$Staff_Data['Avatar']}' />
</td>
<td colspan='2'>
<b>
{$Staff_Username}
</b>
</td>
</tr>
<tr>
<td colspan='2'>
<a href='#'>
Send A Message
</a>
</td>
</tr>
<tr>
<td colspan='3' style='padding: 5px;'>
" . ($Staff_Data['Staff_Message'] ? $Staff_Data['Staff_Message'] : 'This user has yet to set their staff message.') . "
</td>
</tr>
</tbody>
</table>
";
}
echo "<br />";
}
?>
</div>
</div>
</div>
<?php
require_once 'core/required/layout_bottom.php';