<?php
ob_start(); 
error_reporting(0);
include("connect.php");
session_start();

$ver = $_SESSION["manager_id"]; 
$dis_user_id = $_SESSION["admin_id"]; 
$res = mysqli_query($con,"select * from tbl_manager where manager_id='$ver'");
$row  = mysqli_num_rows($res);
$a=mysqli_fetch_array($res);
if($row>0)
{
	$r_temp=$_SESSION['user_session'];
	$session_temp_r=$a['session_id'];
	if ($session_temp_r==$r_temp)
	{
		$uq1=mysqli_query($con,"UPDATE tbl_manager SET activity_time='',login_datetime='',session_id='' where manager_id='$ver'");
		if($uq1)
		{
			unset($_SESSION);
			session_destroy();
			ob_flush();
			ob_clean();
			ob_end_flush();
			ob_end_clean();
			header("Location: https://www.btcover.appexperts.net/");
		}
	}
	else
	{
		unset($_SESSION);
		session_destroy();
		ob_flush();
		ob_clean();
		ob_end_flush();
		ob_end_clean();
		header("Location: https://www.btcover.appexperts.net/");
	}
}
else
{   
    unset($_SESSION);
	session_destroy();
	ob_flush();
	ob_clean();
	ob_end_flush();
	ob_end_clean();
	header("Location: https://www.btcover.appexperts.net/");
}
?>