<nav class="main-header navbar navbar-expand navbar-white navbar-light">
  <!-- Left navbar links -->
  <ul class="navbar-nav">
    <li class="nav-item">
      <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
    </li>
    <li class="nav-item d-none d-sm-inline-block">
      <a href="<?=SITE?>" class="nav-link">Görsel Panel</a> 
    </li>
  </ul> 
  <!-- Right navbar links -->
  <ul class="navbar-nav ml-auto"> 
    <!-- İletişim -->
    <li class="nav-item dropdown">
      <a class="nav-link" data-toggle="dropdown" href="#">
        <i class="far fa-bell"></i>
        <?php if (count($VT->mesaj('okunmamis', '')) !== 0) {  
          echo "<span class='badge badge-warning navbar-badge'>".count($VT->mesaj('okunmamis', ''))."</span>";
        } ?>
      </a>

      <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
        <span class="dropdown-item dropdown-header">İletişim Mesajları</span>
        <div class="dropdown-divider"></div> 

        <a class="dropdown-item"> 
         <?php if (empty($VT->mesaj('okunmamis', ''))) {
          echo "<span class='float-right text-muted text-sm'>Okunmamış mesajınız bulunmuyor.</span>";
        } else { ?> 
        </a> 
        <?php foreach ($VT->mesaj('okunmamis', '') as $bildirim) { ?>
          <a href="#" class="dropdown-item">
            <i class="fas fa-envelope mr-2"></i><?php echo $bildirim["adsoyad"]; ?>
            <span class="float-right text-muted text-sm"><?php echo $bildirim["tarih"]; ?></span>
          </a> 
        <?php }
      } ?> 
      <div class="dropdown-divider"></div> 
      <a href="<?=SITE?>iletisim" class="dropdown-item dropdown-footer">Tümünü Göster</a>
    </div>
  </li>

</ul>
</nav>