-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreplyto.php
More file actions
46 lines (46 loc) · 1.2 KB
/
replyto.php
File metadata and controls
46 lines (46 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
44
45
46
<?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">
<?php
if (!isset($_SESSION['username'])) {
echo "<p>please login first or <a href='/register'>click here</a> to register.</p>";
}
?>
</div>
<?php
if (isset($_SESSION['username'])) {
replytopost($_GET['cid'], $_GET['scid'], $_GET['tid']);
}
?>
<div class="content">
<?php disptopic($_GET['cid'], $_GET['scid'], $_GET['tid']); ?>
</div>
</div>
</body>
</html>