<?php if (!defined('RESTRICTED')) { include ('./../../templates/error/404.php'); } else { ?>

<?php ob_start(); ?>

<?php

if (isset($_GET['id'])) {
	$ID = clean($_GET['id']);
} else {
	$ID = clean("");
}

if (validateResourceAccess($inputToken)) {

	// delete data from menu table
	$sql_delete = "DELETE FROM tbl_admin WHERE id = '$ID'";
	$delete = $connect->query($sql_delete);

	// if delete data success
	if ($delete) {
		$_SESSION['msg'] = "Admin deleted successfully...";
		header( "Location: admin.php");
		exit;
	}

} else {
	systemUpdateFlag($invalidResponse);
}

?>

<?php } ?>