-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadtopic.php
More file actions
43 lines (43 loc) · 1.2 KB
/
readtopic.php
File metadata and controls
43 lines (43 loc) · 1.2 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
<?php
include ('layout_manager.php');
include ('content_function.php');
addview($_GET['cid'], $_GET['scid'], $_GET['tid']);
?>
<html>
<head><title>Ace Forum</title></head>
<link href="/styles/main.css" type="text/css" rel="stylesheet" />
<body>
<div class="pane">
<div class="header"><h1><a href="/">Ace Forum</a></h1></div>
<div class="loginpane">
<?php
session_start();
if (isset($_SESSION['username'])) {
logout();
} else {
if (isset($_GET['status'])) {
if ($_GET['status'] == 'reg_success') {
echo "<h1 style='color: green;'>new user registered successfully!</h1>";
} else if ($_GET['status'] == 'login_fail') {
echo "<h1 style='color: red;'>invalid username and/or password!</h1>";
}
}
loginform();
}
?>
</div>
<div class="forumdesc">
<p>Welcome to the Discussion Forum</p>
<?php
replylink($_GET['cid'], $_GET['scid'], $_GET['tid']);
?>
</div>
<?php
disptopic($_GET['cid'], $_GET['scid'], $_GET['tid']);
echo "<div class='content'><p>All Replies (".countReplies($_GET['cid'], $_GET['scid'], $_GET['tid']).")
</p></div>";
dispreplies($_GET['cid'], $_GET['scid'], $_GET['tid']);
?>
</div>
</body>
</html>