-
Notifications
You must be signed in to change notification settings - Fork 4
/
view_announcement.php
60 lines (58 loc) · 1.04 KB
/
view_announcement.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
<?php
require 'memory.php';
require 'header.inc';
switch ($GET_viewtype) {
case 1:
$table = "user_announce";
break;
case 2:
$table = "gm_announce";
break;
case 3:
$table = "admin_announce";
break;
}
$announce_string = privilege_string($GET_viewtype);
if ($GET_viewtype > $STORED_level) {
redir("index.php", "You cannot view these announcements!");
}
else {
// Displays User announcement options
EchoHead(80);
echo "
<tr class=mytitle>
<td colspan=4>$announce_string Announcements</td>
</tr>
<tr class=myheader>
<td>Post ID</td>
<td>Date</td>
<td width=50%>Message</td>
<td>Poster</td>
</tr>
";
$query = sprintf(VIEW_ANNOUNCE, $table);
$result = execute_query($query, "view_announcement.php");
while ($line = $result->FetchRow()) {
echo "
<tr class=mycell>
";
foreach ($line as $display_index => $col_value) {
if ($display_index == 1) {
$col_value = convert_date($col_value);
}
echo "
<td>
$col_value
</td>
";
}
echo "
</tr>
";
}
echo "
</table>
";
}
require 'footer.inc';
?>