-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
57 lines (40 loc) · 1.37 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
49
50
51
52
53
54
55
56
57
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>TicketVal</title>
<link rel="stylesheet" type="text/css" href="header_style.css">
<link rel="shortcut icon" href="/images/favicon.ico">
</head>
<body>
<header>
<nav>
<img src="images/logo_web.png" id="header" alt="">
<ul>
<li><a href='index.php'>HOME</a></li>
<?php
if (isset($_SESSION['id'])){
echo "<form action='upload.php'>
<button>UPLOAD</button>
</form>";
echo "<form action='showdb.php'>
<button>Show DB</button>
</form>";
echo "<form action='includes/logout.inc.php'>
<button>LOG OUT</button>
</form>";
} else {
echo "<form action='includes/login.inc.php' method='post'>
<input type='text' name='uid' placeholder='Username'>
<input type='password' name='pwd' placeholder='Password'>
<button type='submit'>LOGIN</button>
</form>";
}
?>
<li><a href="signup.php">SIGNUP</a></li>
</ul>
</nav>
</header>