-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
27 lines (27 loc) · 733 Bytes
/
index.php
File metadata and controls
27 lines (27 loc) · 733 Bytes
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Recipes!</title>
<link rel="stylesheet" href="../assets/style.css">
</head>
<body>
<nav>
<a href="/index.php">Home</a>
<a href="recipes/browseRecipes.php">Browse recipes</a>
<?php
if (!session_id()) {
@session_start();
}
if (isset($_SESSION["loggedIn"]) && $_SESSION["loggedIn"] == true) {
echo "<a href='recipes/newRecipe.php'>Add new recipe</a>";
echo "<a href='loginSystem/logout.php'>Logout </a>";
echo "<a href='loginSystem/adminPanel.php'>Admin panel </a>";
} else {
echo "<a href='loginSystem/login.php'>Login</a>";
echo "<a href='loginSystem/register.php'>Register</a>";
}
?>
</nav>
</body>
</html>