<?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>
      ';
   }
}
?>

<header class="header">

   <div class="flex">

      <a href="admin_page.php" class="logo">𝓐𝓭𝓶𝓲𝓷<span>𝓒𝓪𝓷𝓭𝔂</span></a>

      <nav class="navbar">
         <a href="admin_page.php">Beranda</a>
         <a href="admin_products.php">Kelola Produk</a>
         <a href="admin_orders.php">Pesanan Masuk</a>
         <a href="admin_users.php">Pengguna</a>
         <a href="admin_contacts.php">Diskusi
         </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>Nama Pengguna : <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">Keluar</a>
      </div>

   </div>

</header>