-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
43 lines (37 loc) · 811 Bytes
/
index.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
<?php include('server.php');
if(empty($_SESSION['username']))
{
header('location: login.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title>AnonyTunisia</title>
<link rel="stylesheet" type="text/css" href="signup.css">
</head>
<body>
<div class="header">
<h2>Home page</h2>
</div>
<div class="content">
<?php if (isset($_SESSION['success'])):?>
<div class="error success">
<h1>
<?php
echo $_SESSION['success'];
unset($_SESSION['success']);
?>
</h1>
</div>
<?php endif ?>
<?php if (isset($_SESSION["username"])): ?>
<p>Welcome <strong><?php echo $_SESSION['username']; ?></strong></p>
<p><a href="home.php?logout='1'" style="color: red;">Logout</a></p>
<?php endif ?>
</div>
<div id="footer">
© All rights reserved
</div>
</body>
</html>