<?php
    $y = mysqli_query($con,"select maintenance from admin");
    $t = mysqli_fetch_array($y);
    
    $x = mysqli_query($con,"select full_name from users where user_id='$userid'");
    $z = mysqli_fetch_array($x);
?>
<!-- Navbar -->
  <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="#" role="button"><i class="fas fa-bars"></i></a>
      </li>
    </ul>
    <?php if($t['maintenance'] == '1'){ ?>
    <marquee behavior="scroll" direction="left" class='text-danger'><strong>Website maintenance</strong> is activated! <strong>Adding</strong>, <strong>Editing</strong> and, <strong>Deleting</strong> <u>users</u> is not possible! <strong>Adding</strong> and <strong>Removing</strong> <u>credits</u> is not possible!</marquee>
    <?php } ?>
    <!-- Right navbar links -->
    <ul class="navbar-nav ml-auto">
      <li class="nav-item">
        <a class="nav-link" data-widget="fullscreen" href="#" role="button">
          <i class="fas fa-expand-arrows-alt"></i>
        </a>
      </li>
      <li class="nav-item dropdown">
        <a class="nav-link" href="#" data-toggle="dropdown">
          <i class="fas fa-th-large"></i>
        </a>
        <div class="dropdown-menu dropdown-menu-right">
          <a href="create_user" class="dropdown-item text-sm">
            Create User
          </a>
          <div class="dropdown-divider"></div>
          <a href="create_reseller" class="dropdown-item text-sm">
            Create Reseller
          </a>
          <div class="dropdown-divider"></div>
          <a href="view_user" class="dropdown-item text-sm">
            View Users
          </a>
          <div class="dropdown-divider"></div>
          <a href="transfer" class="dropdown-item text-sm">
            Transfer Credit
          </a>
        </div>
      </li>
      <li class="nav-item">
        <a class="nav-link nav-pill user-avatar" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
          <img src="<?php include('extension/logo.php'); ?>" class="img-circle elevation-1" alt="User Image" height="30px">
        </a>
      <div class="dropdown-menu dropdown-menu-right">
        <div class="dropdown-header">
          <div class="media">
              <b><?php echo $z['full_name']; ?></b>
          </div>
        </div>
        <div class="dropdown-divider"></div>
        <a class="btn dropdown-item btn-sm" href="change_password"><i class="fas fa-lock mr-1"></i>Change Password</a>
        <a class="btn dropdown-item btn-sm" href="logout"><i class="fa fa-sign-out-alt mr-1"></i>Logout</a>
      </div>
      </li>
    </ul>
  </nav>
  <!-- /.navbar -->