-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
55 lines (44 loc) · 2.06 KB
/
header.php
File metadata and controls
55 lines (44 loc) · 2.06 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<header class="p-3 mb-3 border-bottom">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
<li><a href="main.php" class="nav-link px-2 link-secondary">Main</a></li>
<li><a href="createPost.php" class="nav-link px-2 link-body-emphasis">Create Post</a></li>
<li><a href="editPost.php" class="nav-link px-2 link-body-emphasis">Edit Post</a></li>
</ul>
<?php
$connection = mysqli_connect("localhost","root","","phpprojekcik");
if(!$connection){
echo "NO ja nie wiem";
exit();
}
$query = "SELECT data FROM profileImages WHERE photoID = '{$_SESSION['currentUser']['photoID']}'";
$res = mysqli_query($connection,$query);
$row = mysqli_fetch_assoc($res);
?>
<div class="dropdown text-end">
<a href="#" class="d-block link-body-emphasis text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
<?php
echo "<img src='data:image/jpg;base64," . base64_encode($row['data']) . "' alt='xd' width='48' height='48' class='rounded-circle'>";
?>
<!-- <img src= alt="mdo" width="32" height="32" class="rounded-circle"> -->
</a>
<ul class="dropdown-menu text-small">
<li><a class="dropdown-item" href="profile.php">Profile</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="logout.php">Sign out</a></li>
</ul>
</div>
</div>
</div>
</header>
</body>
</html>