-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreports.php
More file actions
77 lines (73 loc) · 2.86 KB
/
reports.php
File metadata and controls
77 lines (73 loc) · 2.86 KB
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
<?php
require('connect.php');
$staff = true;
require('header.php');
$reports = $con->query("SELECT * FROM `reports`");
?>
<div class="row"><br /><br /></div>
<div class="row">
<div class="col-2"></div>
<div class="col-lg-8">
<div class="accordion" id="accordion">
<table class="table table-borderless table-sm">
<thead class="thead-dark">
<tr>
<th scope="col">Reports</th>
</tr>
</thead>
<tbody>
<?php
while ($row = $reports->fetch_assoc()) {
$id = $row['id'];
$discord_name = $row['reporter_name'];
$reported = $row['reportee'];
$description = $row['description'];
$proof = $row['proof'];
$notes = json_decode($row['notes']);
$notes_disp = "No notes.";
$resolve_note = $row['message'];
$resolver = $row['resolver'];
if (sizeof($notes) > 0) {
$notes_disp = "";
foreach ($notes as $note) {
$notes_disp .= "$note<br /> ";
}
}
$resolved = "alert alert-warning";
if ($row['resolved'] == '1') $resolved = "alert alert-success";
echo "<tr>
<td>
<div class=\"card\">
<div class=\"card-header\" id=\"headingOne\">
<h5 class=\"$resolved mb-0\">
<button class=\"btn btn-link\" type=\"button\" data-toggle=\"collapse\" data-target=\"#accord$id\" aria-expanded=\"false\" aria-controls=\"accord$id\">
Report #$id - $discord_name
</button>
</h5>
</div>
<div id=\"accord$id\" class=\"collapse\" aria-labelledby=\"headingOne\" data-parent=\"#accordion\">
<div class=\"card-body\">
<ul class=\"list-group list-group-flush\">
<li class=\"list-group-item\">User Reported:<br /> $reported</li>
<li class=\"list-group-item\">Description:<br /> $description</li>
<li class=\"list-group-item\">Proof:<br /> $proof</li>
<li class=\"list-group-item\">Notes:<br /> $notes_disp</li>
<li class=\"list-group-item\">Resolve Message:<br /> $resolve_note<br /> ~$resolver</li>
</ul>
</div>
</div>
</div>
</td>
</tr>";
}
?>
</tbody>
</table>
</div>
<br /><br />
</div>
<div class="col-2"></div>
</div>
<?php
require('footer.php');
?>