-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprofile.php
More file actions
63 lines (56 loc) · 2.05 KB
/
profile.php
File metadata and controls
63 lines (56 loc) · 2.05 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
<!-- http://clipart-library.com/clip-art/coming-soon-transparent-17.htm -->
<?php
// Initialize session
session_start();
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/mycss.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" />
</head>
<body>
<nav>
<input type="checkbox" id="check">
<label for="check" class="checkbtn">
<i class="fas fa-bars"></i>
</label>
<a class="active" href="index.php"><label class="logo"><img id="stockifylogo" src="images/stockify.png" alt="stockify" width="50" height="50"></label></a>
<ul>
<?php
// Change website layout depending on session status
if (isset($_SESSION['loggedin-status'])) {
echo "<li><a href='index.php'>Home</a></li>
<li><a href='about.php'>About</a></li>
<li><a href='list.php'>Companies</a></li>
<li><a href='portfolio.php'>Portfolio</a></li>
<li><a class='active' href='profile.php'>Profile</a></li>
<li><a href='favorites.php'>Favorites</a></li>
<li>
<form method='post'>
<button id='hamburgerLogout' type='hidden' name='logout' value='Logout'>Logout</button>
</form>
</li>";
} else {
echo "<li><a href='index.php'>Home</a></li>
<li><a href='about.php'>About</a></li>
<li><a href='list.php'>Companies</a></li>
<li><a href='login.php'>Login</a></li>";
}
// End the session and clears the session variables
if (isset($_POST['logout'])) {
$_SESSION = array();
session_destroy();
header("Location: index.php");
}
?>
</ul>
</nav>
<h1>PROFILE</h1>
<section class="mainSection">
<img id="comingsoon" src="images/comingsoon.png" alt="comingsoon">
</section>
</body>
</html>