-
Notifications
You must be signed in to change notification settings - Fork 0
/
nt.php
57 lines (50 loc) · 1.74 KB
/
nt.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
<?php
include('signInOut.php');
include('func.php');
?>
<html>
<head>
<title>DISCUZZION</title>
</head>
<link href = "./style.css" type = "text/css" rel = "stylesheet" />
<a href="https://github.com/hardik-codes/DISCUZZION"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<div class = "dashboard">
<div class = "top"><h1><a href = "/forum4">DISCUZZION.......</a></h1></div>
<div class = "signin">
<?php
session_start();
if (isset($_SESSION[username])) {
signout();
//signout function
} else {
if (isset($_GET[status])) {
if ($_GET[status] == 'reg_success') {
echo "<h1 style = 'color : green;'>New user registered successfully !!<br> Login to continue</h1>";
} else if ($_GET[status] == 'login_fail'){
echo "<h1 style = 'color : red;'>Invalid username and/or password!</h1>";
}
}
signup_form();
}
?>
</div>
<div class = "description">
</div>
<div class = "matter">
<?php session_start();
if (isset($_SESSION['username'])) {
echo "<form action='/forum4/ant.php?c=".$_GET['c']."&s=".$_GET['s']."'
method='POST'>
<p>Title: </p>
<input type='text' id='topic' name='topic' size='100' />
<p>Content: </p>
<textarea id='content' name='content'></textarea><br />
<input type='submit' value='Add new topic' /></form>";
} else {
echo "<p>Please login first or <a href='/forum4/signUp.php'>click here</a> to register.</p>";
}
?>
</div>
</div>
</body>
</html>