<?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 duatop_setting WHERE ID = '".$_POST['idevent']."'");
if(mysqli_num_rows($gettt)){
mysqli_query($conn, "Delete From duatop_setting WHERE ID = '".$_POST['idevent']."'");
mysqli_query($conn, "Delete From duatop_vitri WHERE IDTOP = '".$_POST['idevent']."'");
	die('0');
} else {
	die('ID này không tồn tại.');
}
}
?>