<?php
session_start();
include_once('db.php');
$bdd = new DB();
$user_check=$_SESSION['login_admin'];
$user_ID=$_SESSION['admin_id'];

//$ses_sql=mysqli_query($con,"select user_id,username from user where user_id='$user_ID' and username='$user_check'") or die(mysqli_error());

$row = $bdd->getOne("SELECT user_id,username FROM user where user_id='$user_ID' and username='$user_check'");

//$row=mysqli_fetch_assoc($ses_sql);
$login_session=$row['username'];
$login_sessionid=$row['user_id'];

if(!isset($login_session)){
	if(!isset($sessionid)){
	mysqli_close($con);
	header('location:index.php');
	}
}

?>