-
Notifications
You must be signed in to change notification settings - Fork 2
/
header.php
178 lines (135 loc) · 7.04 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
/**
* Header Navbar for all the pages.
*
* @version PHP 8.0.12
* @since June 2022
* @author AtharvaShah
*/
include_once("connection.php");
if(empty($_SESSION))
{
header("Location: login.php");
}
if(isset($_SESSION['user_id']))
{
$id = $_SESSION['user_id'];
$query = "select `profile_pic` from users where user_id = '$id'";
$result = mysqli_query($con,$query);
if($result && mysqli_num_rows($result) > 0){
$pic = mysqli_fetch_array($result);
$pfp= $pic[0];
}
}
?>
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- custom css link -->
<link href="CSS/header.css" rel="stylesheet" crossorigin="anonymous">
<style type="text/css">
/* ============ desktop view ============ */
@media all and (min-width: 992px) {
.navbar .nav-item .dropdown-menu {
display: none !important;
}
.navbar .nav-item:hover .dropdown-menu {
display: block !important;
}
.navbar .nav-item .dropdown-menu {
margin-top: 0 !important;
}
}
/* ============ desktop view .end// ============ */
</style>
</head>
<!-- <div class="container"> -->
<!-- ============= COMPONENT ============== -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary" id="myHeader">
<div class="container-fluid">
<a class="navbar-brand" href="welcome.php"><img src="images/website/logo.png" height="50" width="50"/></a>
<span class="full-form">WHAT YOU DOIN' RIGHT NOW</span>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#main_nav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main_nav">
<ul class="navbar-nav" id="centerHeader">
<!-- Browse Media Dropdown-->
<li class="nav-item dropdown">
<li class="nav-link" href="#" data-bs-toggle="dropdown">Browse</li>
<ul class="dropdown-menu dropdown-menu-right" id="browse">
<li><a class="dropdown-item" href="MediaAPIs/Book/index.php">
<span>📕 Book</span>
</a></li>
<li><a class="dropdown-item" href="MediaAPIs/Movie/index.php">
<span>📽 Movie</span>
</a></li>
<li><a class="dropdown-item" href="MediaAPIs/Music/index.php">
<span>🎧 Music</span>
</a></li>
<li><a class="dropdown-item" href="MediaAPIs/TV/index.php">
<span>📺 TV</span>
</a></li>
<li><a class="dropdown-item" href="MediaAPIs/Videogame/index.php">
<span>🎮 Videogame</span>
</a></li>
</ul>
</li>
<!-- DIARY, FEED AND SEARHC USERS -->
<li class="custom-item"><a class="nav-link" href="diary.php">Diary</a></li>
<li class="custom-item"><a class="nav-link" href="feed.php">Feed</a></li>
<li class="custom-item"><a class="nav-link" href="search_users.php">Search Users</a></li>
<!-- Your Media Dropdown -->
<li class="nav-item dropdown">
<li class="nav-link" href="#" data-bs-toggle="dropdown">Media</li>
<ul class="dropdown-menu dropdown-menu-end" id="media">
<li><a class="dropdown-item" href="media_book.php">
<span>📕 Book</span>
</a></li>
<li><a class="dropdown-item" href="media_movie.php">
<span>📽 Movie</span>
</a></li>
<li><a class="dropdown-item" href="media_music.php">
<span>🎧 Music</span>
</a></li>
<li><a class="dropdown-item" href="media_tv.php">
<span>📺 TV</span>
</a></li>
<li><a class="dropdown-item" href="media_videogame.php">
<span>🎮 Videogame</span>
</a></li>
</ul>
</li>
</ul>
<ul class="navbar-nav ms-auto">
<!-- Your Account Dropdown -->
<li class="nav-item dropdown">
<li class="nav-link" href="#" data-bs-toggle="dropdown" id="profile_link"> <img src="<?php echo $pfp;?>" id="myProfilePic"> </li>
<ul class="dropdown-menu dropdown-menu-end" id="your-account">
<li><a class="dropdown-item" href="profile.php">
<span><img src="images/Icons/profile.png" class='header-icon'>Profile</span>
</a></li>
<li><a class="dropdown-item" href="edit_profile.php">
<span><img src="images/Icons/settings.png" class='header-icon'>Settings</span>
</a></li>
<li><a class="dropdown-item" href="Exports/import_export.php">
<span><img src="images/Icons/importexport.png" class='header-icon'>Import/Export</span>
</a></li>
<li><a class="dropdown-item" href="logout.php">
<span><img src="images/Icons/logout.png" class='header-icon'>Logout</span>
</a></li>
</ul>
</li>
<li><a href="notifications.php"><img src="images/Icons/notification.png" id="notif-bellcon" alt="notifications"></a></li>
</ul>
</div>
<!-- navbar-collapse.// -->
</div>
<!-- container-fluid.// -->
</nav>
<!-- ============= COMPONENT END// ============== -->