-
Notifications
You must be signed in to change notification settings - Fork 2
/
admin_header.php
66 lines (55 loc) · 2.12 KB
/
admin_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
<?php
if(isset($message)){
foreach($message as $message){
echo '
<div class="message">
<span>'.$message.'</span>
<i class="fas fa-times" onclick="this.parentElement.remove();"></i>
</div>
';
}
}
?>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>admin panel</title>
<!-- font awesome cdn link -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<!-- custom admin css file link -->
<link rel="stylesheet" href="css/admin_style.css">
</head>
<header class="header">
<div class="flex">
<a href="admin_page.php" class="logo">Admin<span>Panel</span></a>
<nav class="navbar">
<a href="admin_page.php">Home</a>
<a href="admin_products.php">Products</a>
<a href="admin_featuredproduct.php">FeatuedProduct</a>
<a href="admin_orders.php">Orders</a>
<a href="admin_users.php">Users</a>
<a href="admin_contacts.php">Messages</a>
</nav>
<div class="icons">
<div id="menu-btn" class="fas fa-bars"></div>
<a href="admin_profile.php" class="admin_profile"> <?php
$select = mysqli_query($conn, "SELECT * FROM `users` WHERE id = '$admin_id '") or die('query failed');
if(mysqli_num_rows($select) > 0){
$fetch = mysqli_fetch_assoc($select);
}
if($fetch['image'] == ''){
echo '<img src="image/default-avatar.png">';
}else{
echo '<img src="uploaded_img/'.$fetch['image'].'">';
}
?></a>
</div>
<!-- <div class="account-box">
<p>username : <span><?php echo $_SESSION['admin_name']; ?></span></p>
<p>email : <span><?php echo $_SESSION['admin_email']; ?></span></p>
<a href="logout.php" class="delete-btn">logout</a>
<div>new <a href="login.php">login</a> | <a href="register.php">register</a></div>
</div> -->
</div>
</header>