<?php
ob_start();
error_reporting(0);
include("connect.php");
session_start(); 
$ver = $_SESSION["admin_id"];
$m_id = $_SESSION["manager_id"];
$user_type = $_SESSION["user_type"];
if(!isset($_SESSION["admin_id"])){
   header('location:http://www.btcover.appexperts.net');
}
?>
<script>
$(document).ready(function()
{
  
	
    $('button').bind('click', function(e) 
    {
        if ( !e.metaKey && e.ctrlKey )
            e.metaKey = e.ctrlKey;
        if(!e.metaKey)
        {
       		
			return true;
        }
		e.stopImmediatePropagation();           
        e.preventDefault();
        e.stopPropagation();
        return false;
		
})
 
});



$(document).ready(function()
{
    $('a').bind('click', function(e) 
    {
        if ( !e.metaKey && e.ctrlKey )
           e.metaKey = e.ctrlKey;
		if(!e.metaKey)
        {
			return true;
        }
		e.stopImmediatePropagation();           
        e.preventDefault();
        e.stopPropagation();
        return false;
})
 
});

</script>
<?php
$selrenew=mysqli_query($con,"select * from tbl_admin_panel where admin_id='$ver'");
while($recset=mysqli_fetch_array($selrenew))
{
	$renewdate=$recset['next_renew_date'];
	//$pname=$recset['plan_name'];
}
date_default_timezone_set('Asia/Calcutta');
$curdate= date("Y-m-d");
$arr=explode(' ',$renewdate);
$arrlen=count($arr);
$date=explode('-',$arr[0]);
$yy=$date[0];
$mm=$date[1];
$dd=$date[2];
$time=explode(':',$arr[1]);
$hh=$time[0];
$mm1=$time[1];
$ss=$time[2];
$mkdate=mktime($hh,$mm1,$ss,$mm,$dd,$yy);
$mydate=date("Y-m-d",$mkdate);

if(strtotime($curdate) > strtotime($mydate))
{
	header("location:http://www.btcover.appexperts.net/renew-pay.php");
}				
?>
<!--top-Header-menu-->

<?php
						$res = mysqli_query($con,"select * from tbl_manager where manager_id='$m_id'");
						$row  = mysqli_num_rows($res);
						$a=mysqli_fetch_array($res);
						if($row>0)
						{
							$r_temp=$_SESSION['user_session'];
							$user_name=$a['manager_name'];
							$temp_activity=$a['activity_time'];
							$session_temp_r=$a['session_id'];
							$temp_time=time();
							if ($session_temp_r==$r_temp)
							{
								if($temp_time - $temp_activity > 480)
									header("Location:http://www.btcover.appexperts.net/logout.php");
								else
									$uq1=mysqli_query($con,"UPDATE tbl_manager SET activity_time='$temp_time' where manager_id='$m_id'");
							}
							else
							{
								header("Location:http://www.btcover.appexperts.net/logout.php");
							}
						}
						?>
						
<header class="topbar" data-navbarbg="skin5">
            <nav class="navbar top-navbar navbar-expand-md navbar-dark">
                <div class="navbar-header" data-logobg="skin5">
                    <!-- This is for the sidebar toggle which is visible on mobile only -->
                    <a class="nav-toggler waves-effect waves-light d-block d-md-none" href="javascript:void(0)"><i class="ti-menu ti-close"></i></a>
                  
                    <a class="navbar-brand" href="index.html">
                        <!-- Logo icon -->
                        <b class="logo-icon p-l-10">
                        
                            <img src="assets/images/logo-icon.png" alt="homepage" class="light-logo" />
                           
                        </b>
                        <!--End Logo icon -->
                         <!-- Logo text -->
                        <span class="logo-text">
                             <!-- dark Logo text -->
                             <img src="assets/images/logo-text.png" alt="homepage" class="light-logo" />
                            
                        </span>
                       
                    </a>
                   
                    <a class="topbartoggler d-block d-md-none waves-effect waves-light" href="javascript:void(0)" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><i class="ti-more"></i></a>
                </div>
                <div class="navbar-collapse collapse" id="navbarSupportedContent" data-navbarbg="skin5">
                    <ul class="navbar-nav float-left mr-auto">
                        <li class="nav-item d-none d-md-block"><a class="nav-link sidebartoggler waves-effect waves-light" href="javascript:void(0)" data-sidebartype="mini-sidebar"><i class="mdi mdi-menu font-24"></i></a></li>

                       <!-- <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                             <span class="d-none d-md-block">Renewal Transactions <i class="fa fa-angle-down"></i></span>
                             <span class="d-block d-md-none"><i class="fa fa-plus"></i></span>   
                            </a>
                            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="#">Make Renewal</a>
								 <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="#">Renewal History</a>
                            </div>
                        </li>-->
                    </ul>
                   
                    <ul class="navbar-nav float-right">
                     
                        <!--<li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle waves-effect waves-dark" href="" id="2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="font-24 mdi mdi-comment-processing"></i>
                            </a>
                            <div class="dropdown-menu dropdown-menu-right mailbox animated bounceInDown" aria-labelledby="2">
                                <ul class="list-style-none">
                                    <li>
                                        <div class="">
                                            <a href="javascript:void(0)" class="link border-top">
                                                <div class="d-flex no-block align-items-center p-10">
                                                    <span class="btn btn-success btn-circle"><i class="ti-calendar"></i></span>
                                                    <div class="m-l-10">
                                                        <h5 class="m-b-0">Event today</h5> 
                                                        <span class="mail-desc">Just a reminder that event</span> 
                                                    </div>
                                                </div>
                                            </a>
                                         
                                            <a href="javascript:void(0)" class="link border-top">
                                                <div class="d-flex no-block align-items-center p-10">
                                                    <span class="btn btn-info btn-circle"><i class="ti-settings"></i></span>
                                                    <div class="m-l-10">
                                                        <h5 class="m-b-0">Settings</h5> 
                                                        <span class="mail-desc">You can customize this template</span> 
                                                    </div>
                                                </div>
                                            </a>
                                          
                                            <a href="javascript:void(0)" class="link border-top">
                                                <div class="d-flex no-block align-items-center p-10">
                                                    <span class="btn btn-primary btn-circle"><i class="ti-user"></i></span>
                                                    <div class="m-l-10">
                                                        <h5 class="m-b-0">Pavan kumar</h5> 
                                                        <span class="mail-desc">Just see the my admin!</span> 
                                                    </div>
                                                </div>
                                            </a>
                                            
                                            <a href="javascript:void(0)" class="link border-top">
                                                <div class="d-flex no-block align-items-center p-10">
                                                    <span class="btn btn-danger btn-circle"><i class="fa fa-link"></i></span>
                                                    <div class="m-l-10">
                                                        <h5 class="m-b-0">Luanch Admin</h5> 
                                                        <span class="mail-desc">Just see the my new admin!</span> 
                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                    </li>
                                </ul>
                            </div>
                        </li>-->
                       
                        <li class="nav-item dropdown">
                            <a class="nav-link dropdown-toggle text-muted waves-effect waves-dark pro-pic" href="" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Welcome <?php echo $user_name; ?>&nbsp; <img src="assets/images/users/1.jpg" alt="user" class="rounded-circle" width="31"></a>
                            <div class="dropdown-menu dropdown-menu-right user-dd animated">
                                
                             
                                <a class="dropdown-item" href="logout.php"><i class="fa fa-power-off m-r-5 m-l-5"></i> Logout</a>
                            </div>
                        </li>
                       
                    </ul>
                </div>
            </nav>
        </header>
							
<!--close-top-Header-menu-->

