-
Notifications
You must be signed in to change notification settings - Fork 40
/
header.php
48 lines (36 loc) · 1.14 KB
/
header.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
<?php
include_once 'admin-panel.php';
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title> </title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<header>
<nav>
<div class="main-wrapper">
<ul>
<li><a href="index.php">home</a></li>
</ul>
<div class="nav-login">
<?php
if (isset($_SESSION['u_id'])) {
echo '<form action="includes/logout.inc.php" method="POST">
<button type="submit" name="submit">logout</button>
</form>';
} else{
echo '<form action="includes/login.inc.php" method="POST">
<input type="text" name="uid" placeholder="username/e-mail">
<input type="password" name="pwd" placeholder="password">
<button type="submit" name="submit">login</button>
</form>
<a href="signup.php">signup</a>';
}
?>
</div>
</div>
</nav>
</header>