<?php
$sql="SELECT * FROM user_tbl WHERE user_phone='".$_SESSION['user']."' OR user_id='".$_SESSION['user']."'";
$query=mysqli_query($conn,$sql);
$result=mysqli_fetch_array($query);
$username=$result['user_id'];
$fname=$result['user_name'];
$address=$result['user_address'];
$email=$result['user_email'];
$mobile=$result['user_phone'];
$id=$result['id'];
$created=$result['created'];

?>   
   <a href="home.php" class="logo" style="background:#008B8B;">      
     <span style="font-size:16px;"> <?php echo $result['user_type'];?></span>
    </a>
    <nav class="navbar navbar-static-top" style="background:#008B8B;">      
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>
      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">	
			<li class="dropdown notifications-menu">
			<a href="#" class="dropdown-toggle" data-toggle="dropdown">
			  <i class="fa fa-bell-o"></i>
			  <span class="label label-warning">10</span>
			</a>
			<ul class="dropdown-menu">
			  <li class="header">10 new medicine expired shortly</li>
			</ul>
			</li>			
          <li class="dropdown user user-menu" >
            <a href="#" class="dropdown-toggle" data-toggle="dropdown" >
			
              <img src="assets/dist/img/user2-160x160.jpg" class="user-image" alt="User Image">
			
              <span class="hidden-xs" style="text-transform:capitalize;"><?php echo $fname; ?></span>
            </a>
            <ul class="dropdown-menu" >              
              <li class="user-header" style="background-color:#f39c12 !important">				
				<img src="assets/dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
				
                <p>
                  <?php echo $fname; ?> - <?php echo $result['user_type'];?>
                  <small>Member since <?php echo date("M, Y",$created);?></small>
                </p>
              </li>             
              <li class="user-body">              
              </li>              
              <li class="user-footer">
                <div class="pull-left">
                  <a href="#" class="btn btn-default btn-flat">Profile</a>
                </div>
                <div class="pull-right">
				  <a href="logout.php" class="btn btn-default btn-flat">Sign out</a>                  
                </div>
              </li>
            </ul>
          </li>
			
         <!-- <li>
            <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
          </li>-->
        </ul>
      </div>
    </nav>