<?php
include_once 'includes/header.inc.php';
if(!$session->getRole() == 2){
header("location: login.php");
}
$id = $database->escape($_GET['id']);
if($_GET['action'] == "confirmed"){
$database->query("DELETE FROM `cal_users` WHERE `id` = '$id'");
header("location: user_management.php");
}
?>
<legend>Are you sure you want to remove this user?</legend>
<a href="<?php echo $url; ?>user_edit.php?id=<?php echo $id; ?>" class="btn btn-danger">No</a>
<a href="<?php echo $url; ?>user_delete.php?id=<?php echo $id; ?>&action=confirmed" class="btn btn-success">Yes</a>
<?php include_once 'includes/footer.inc.php'; ?>