summaryrefslogtreecommitdiff
path: root/htdocs/moderate/schedule/delete.php
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-08-30 12:29:19 -0700
committerJesse Morgan <jesse@jesterpm.net>2017-09-04 11:16:53 -0700
commite121bbebe3ccd990b66a7b04289adf481a4aa2af (patch)
tree5955357921d66db47769cba75d950cea3894dd04 /htdocs/moderate/schedule/delete.php
parent558684e32769d9dbd0d27a6feb3bbb9cf9aa22d7 (diff)
Working on the moderation schedule iterator
Diffstat (limited to 'htdocs/moderate/schedule/delete.php')
-rw-r--r--htdocs/moderate/schedule/delete.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/htdocs/moderate/schedule/delete.php b/htdocs/moderate/schedule/delete.php
new file mode 100644
index 0000000..76b8866
--- /dev/null
+++ b/htdocs/moderate/schedule/delete.php
@@ -0,0 +1,49 @@
+<?php
+
+/* Foursquare Community Site
+ *
+ * Copyright (C) 2011 Foursquare Church.
+ *
+ * Developers: Jesse Morgan <jmorgan@foursquarestaff.com>
+ *
+ */
+
+require_once('../../src/base.inc.php');
+
+// Verify User is admin
+if (!isset($_SESSION['currentUser']) or !$_SESSION['currentUser']->isAdmin()) {
+ header('Location: ' . buildUrl('moderate/'));
+ exit;
+}
+
+$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 "<h3>Delete Users</h3>";
+
+if ($user !== false) {
+ echo "<p>Are you sure you want to delete " . $user->getName() ."?</p>"
+ . "<p><a href=\"delete.php?id=". $user->getId() ."&confirmed\">Yes</a>"
+ . " <a href=\"index.php\">No</a></p>";
+
+} else {
+ echo "<p>No user to delete.</p>";
+}
+
+require_once('../src/footer.inc.php');
+
+?>
+