<?php
    $user_run = mysqli_query($con, "SELECT * FROM users WHERE uid = '$_SESSION[uid]'");
    $user_row = mysqli_fetch_assoc($user_run);
    if (!empty($user_row["uphoto"])) {
        
        $profile_img = "../upload/profile_img/".$user_row["uphoto"];
    }else{
        $profile_img = "../upload/profile_img/default.jpg";
    }
?>

 <header id="header" class="fixed-top" style="background-color:#116496;">
      
	  <div class="container" >
      <div class="logo float-left hidden-xs hidden-sm">       
        <a href="index.php" class="scrollto"><img src="img/logo.png" alt="" class="img-fluid"></a> 
      </div>
	  
	  
	   <div class="row about-container">
	   <div class="col-8 col-sm-8 col-md-8 hidden-md hidden-lg" align="right">
	   <div class="logo">
   
        <a href="index.php" class="scrollto" ><img src="img/logo.png"   alt="ome" class="img-fluid "></a>
		</div></div>
		<div class="col-4 col-sm-4 col-md-4 hidden-md hidden-lg" align="right">
      <div class="profile"><a href="profile.php"><img src="<?php echo $profile_img; ?>" width="40%" class="profile-img"></a></div>
    </div>
		</a>	  
        </div>


      <nav class="main-nav float-right d-none d-lg-block" >
        <ul>
          <li class="active hidden-xs hidden-sm" ><a href="index.php">Home</a></li>
		      <li class="active hidden-md hidden-lg"  style="font-size:20px;"><a href="index.php"><i class="fa fa-home" aria-hidden="true"></i> </a></li>
		  
          <li><a href="attendance.php">Attendance</a></li>
          <li><a href="view-notes-class.php">Notes</a></li>
          <li><a href="view-homework-class.php">Homework</a></li>
          <li><a href="view-notice.php">Notice</a></li>
          <li><a href="profile.php">Profile</a></li>
          <li><a href="#logoutModal" data-toggle="modal" data-toggle="modal" class="text-decoration-none" style="color: red;"> Logout <i class="fa fa-sign-out"></i>
            </a>
          </li>
      </nav><!-- .main-nav -->
      
    </div>
  </header>

  <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
                <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
            <div class="modal-footer">
                <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
                <a class="btn btn-primary" href="logout.php">Logout</a>
            </div>
        </div>
    </div>
</div>
<!--Pre Defined Functions--> 
<?php include "function.php"; ?>