-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathforum.php
More file actions
72 lines (66 loc) · 1.97 KB
/
forum.php
File metadata and controls
72 lines (66 loc) · 1.97 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>APATH FORUM</title>
<link rel="stylesheet" href="apath.css">
<style>
.error {color: #FF0000;}
.forum-container {
margin: 20px;
}
.thread-list {
list-style-type: none;
padding: 0;
}
.thread-item {
padding: 10px;
border: 1px solid #ccc;
margin-bottom: 10px;
border-radius: 4px;
}
.thread-item a {
text-decoration: none;
color: #000;
}
.thread-item a:hover {
text-decoration: underline;
}
.new-thread {
margin-top: 20px;
}
</style>
</head>
<body>
<div class="container">
<h1>APATH</h1>
<?php
$current_page = basename($_SERVER['PHP_SELF']);
include "nav.php";
?>
<h2>Forum</h2>
<div class="forum-container">
<ul class="thread-list">
<?php
// Example threads - replace with dynamic content from your database
$threads = [
['id' => 1, 'title' => 'Welcome to APATH!'],
['id' => 2, 'title' => 'General Discussion'],
['id' => 3, 'title' => 'Volunteer Opportunities'],
['id' => 4, 'title' => 'Student Q&A'],
['id' => 5, 'title' => 'Admin Alerts']
];
foreach ($threads as $thread) {
echo '<li class="thread-item"><a href="thread.php?id=' . $thread['id'] . '">' . $thread['title'] . '</a></li>';
}
?>
</ul>
<div class="new-thread">
<a href="new_thread.php">Start New Thread</a>
</div>
</div>
<p class="footer"><a href="#">Covid Information and Guidelines</a></p>
</div>
</body>
</html>