From f08eb1640388e1f067102a22ec40c30f263d92c6 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 2 Jun 2011 16:17:25 -0700 Subject: Added user management --- htdocs/moderate/users/delete.php | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 htdocs/moderate/users/delete.php (limited to 'htdocs/moderate/users/delete.php') diff --git a/htdocs/moderate/users/delete.php b/htdocs/moderate/users/delete.php new file mode 100644 index 0000000..f721f30 --- /dev/null +++ b/htdocs/moderate/users/delete.php @@ -0,0 +1,43 @@ + + * + */ + +require_once('../../src/base.inc.php'); + +$error = ''; + +$user = false; +if (isset($_GET['id']) and is_numeric($_GET['id'])) { + $user = User::getById($_GET['id']); + + if ($user !== false and isset($_GET['confirmed'])) { + $user->delete(); + + header('Location: index.php'); + } + +} + +require_once('../src/header.inc.php'); + +echo "

Delete Users

"; + +if ($user !== false) { + echo "

Are you sure you want to delete " . $user->getName() ."?

" + . "

getId() ."&confirmed\">Yes" + . " No

"; + +} else { + echo "

No user to delete.

"; +} + +require_once('../src/footer.inc.php'); + +?> + -- cgit v1.2.3