-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
59 lines (48 loc) · 1.15 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
if (!session_id()) {
session_start();
}
include 'db.php';
if (empty($_SESSION['user'])) {
header('Location: index.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<link href="js/bootstrap.min.css" rel='stylesheet' type='text/css' />
<link href="css/default.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css">
.fontColor{
color: white;
font-size: 1.0vw;
}
</style>
</head>
<body>
<!-- header-section-starts -->
<div class="header">
<div class="header-top-strip">
<div class="container">
<div class="header-top-left">
<ul>
<?php
$userId=$_SESSION['user'];
$res=$conn->query("select * from user where userId='$userId';");
$row=$res->fetch_object();
echo "
<li ><a href='#'><span class='glyphicon glyphicon-user'> </span>". strtoupper($row->userName)."</a></li>"
?>
</ul>
</div>
<div class="header-right">
<div class="cart box_1">
<a class="fontColor" href="logout.php"> <span class='glyphicon glyphicon-off'> Logout </a>
</div>
</div>
<div class="clearfix"> </div>
</div>
</div>
</div>
</body>
</html>