<?php
ob_start();
error_reporting(0);
include("connect.php");
session_start();
$ver = $_SESSION['distributor_user_id'];
$user_role= $_SESSION['user_role'];
if(!isset($_SESSION["distributor_user_id"])){
   header('location:https://tarkashcorp.appexperts.net/index.php');
}
?>

        <header class="page-header">
            <nav class="navbar" role="navigation">
                <div class="container-fluid">
                    <div class="havbar-header">
                        <!-- BEGIN LOGO -->
						<a id="index" class="" href="dashboard.php">
                         <img src="assets/layouts/layout6/img/app_logo.png" style="height:60px; width:100px;" alt="Logo" />
					    </a>
                        <!-- END LOGO -->
                        <!-- BEGIN TOPBAR ACTIONS -->  
                        <div class="topbar-actions">
                            <!-- BEGIN USER PROFILE -->
                            <div class="btn-group-img btn-group">
							
						<?php
						$res = mysqli_query($con,"select * from tbl_distributor_users where distributor_user_id='$ver'");
						$row  = mysqli_num_rows($res);
						$a=mysqli_fetch_array($res);
						if($row>0)
						{
							$r_temp=$_SESSION['user_session'];
							$user_name=$a['distributor_name'];
							$temp_activity=$a['activity_time'];
							$session_temp_r=$a['session_id'];
							$temp_time=time();
						}
						?>
									
                                <button type="button" class="btn btn-sm dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" data-close-others="true">
                                    <img src="assets/layouts/layout5/img/user.png" style="height:60px; width:60px; padding-right:10px;" alt="User Profile"/>
									<span class="username username-hide-on-mobile" style="margin-right:20px; margin-left:-20px; font-family:bold; font-size:16px; color:#36c6d3;"><?php echo $user_name; ?></span>
									</button>
									
								<ul class="dropdown-menu-v2" role="menu">
									<li>
                                        <a href="logout.php">
                                            <i class="icon-key"></i> Log Out </a>
                                    </li>
                                </ul>
                            </div>
                            <!-- END USER PROFILE -->
                        </div>
                        <!-- END TOPBAR ACTIONS -->
                    </div>
                </div>
                <!--/container-->
            </nav>
        </header>