-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin_header.php
More file actions
41 lines (35 loc) · 1.33 KB
/
admin_header.php
File metadata and controls
41 lines (35 loc) · 1.33 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
<?php
if(isset($message)){
foreach($message as $message){
// The period (.) is the concatenation operator in PHP. It is used to concatenate strings together. In this context,
// its used to concatenate the HTML markup and the message stored in the $message variable
echo
<div class="message">
<span>'.$message.'</span>
<i class="fas fa-times" onclick="this.parentElement.remove()"></i>
</div>
';
}
}
?>
<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_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>
<div id="user-btn" class="fas fa-user"></div>
</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>
</div>
</header>