diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-14 16:35:31 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-14 16:35:31 +0000 |
commit | aa8219c03996d7ba325d71857bb34270a993d3f6 (patch) | |
tree | c90692fa1692f86237986843c561b935fb809858 /series/trunk/admin/deleteuser.php | |
parent | 6b6e632d858d2371525242e394e692da291c7502 (diff) | |
download | instadisc-aa8219c03996d7ba325d71857bb34270a993d3f6.tar.gz instadisc-aa8219c03996d7ba325d71857bb34270a993d3f6.tar.bz2 instadisc-aa8219c03996d7ba325d71857bb34270a993d3f6.zip |
Series: Added user management
Refs #53
Diffstat (limited to 'series/trunk/admin/deleteuser.php')
-rw-r--r-- | series/trunk/admin/deleteuser.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/series/trunk/admin/deleteuser.php b/series/trunk/admin/deleteuser.php new file mode 100644 index 0000000..7d1b0a0 --- /dev/null +++ b/series/trunk/admin/deleteuser.php | |||
@@ -0,0 +1,49 @@ | |||
1 | <?php | ||
2 | |||
3 | /* InstaDisc Series - A Four Island Project */ | ||
4 | |||
5 | /** | ||
6 | * require_once() is used to ensure | ||
7 | * the ACP files are being called by | ||
8 | * admin.php instead of their actual | ||
9 | * locations admin/. | ||
10 | * The _once() part ensures no problem | ||
11 | * arises as includes/instadisc.php has | ||
12 | * already been included from admin.php | ||
13 | */ | ||
14 | require_once('includes/instadisc.php'); | ||
15 | |||
16 | if (!isset($_SESSION['username'])) | ||
17 | { | ||
18 | header('Location: index.php'); | ||
19 | exit; | ||
20 | } | ||
21 | |||
22 | if (!instaDisc_isAdmin($_SESSION['username'])) | ||
23 | { | ||
24 | header('Location: index.php'); | ||
25 | exit; | ||
26 | } | ||
27 | |||
28 | if (!isset($_GET['submit'])) | ||
29 | { | ||
30 | $template = new FITemplate('deleteuser'); | ||
31 | $template->add('SITENAME',instaDisc_getConfig('siteName')); | ||
32 | $template->add('ID',$_GET['userid']); | ||
33 | |||
34 | $sub = instaDisc_getUserByID($_GET['userid']); | ||
35 | $template->add('USERNAME',$sub['username']); | ||
36 | $template->display(); | ||
37 | } else { | ||
38 | if ($_POST['submit'] == 'Yes') | ||
39 | { | ||
40 | instaDisc_deleteUser($_POST['id']); | ||
41 | |||
42 | $template = new FITemplate('deleteduser'); | ||
43 | $template->display(); | ||
44 | } else { | ||
45 | header('Location: admin.php?id=main'); | ||
46 | } | ||
47 | } | ||
48 | |||
49 | ?> | ||