role !== 'admin') { header('Location: /admin/users'); exit(); } if (isset($_GET['slug'])) { $user = new User($_GET['slug']); if (isset($_GET['confirm'])) { $user->delete(); header('Location: /admin/users'); exit(); } echo "

Deletion of $user->name

"; echo "

Are you sure you want to delete this page?

"; echo "Cancel"; echo "Confirm"; } ?>