<?php
session_start();
include_once('../config/#Config.php');
if(!$_SESSION['UserName']){
die('<script>window.location.href=\''.$config['site']['url'].'index.php\';</script>');
} else {
$get_AD = mysqli_query($conn, "Select * From config_admin WHERE Account = '".$_SESSION['UserName']."'");
if(!mysqli_num_rows($get_AD)){
	die('Không đủ quyền.');
}
$gettt = mysqli_query($conn, "Select * From logs_user WHERE ID = '".$_POST['id']."'");
if(mysqli_num_rows($gettt)){
mysqli_query($conn, "Delete From logs_user WHERE ID = '".$_POST['id']."'");
	die('0');
} else {
	die('Không tìm thấy vật phẩm này.');
}
}
?>