<?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('Khong d? quy?n.');
}
$gettt = mysqli_query($conn, "Select * From boxcard WHERE szProductld = '".$_POST['a']."'");
if(mysqli_num_rows($gettt)){
mysqli_query($conn, "Delete From boxcard WHERE szProductld = '".$_POST['a']."'");
	die('0');
} else {
	die('Khong tim th?y Goi nay.');
}
}
?>