From cce5e7710295021b41d9aaecc503a60fb99256be Mon Sep 17 00:00:00 2001 From: deva Date: Sat, 4 Oct 2008 10:38:03 +0000 Subject: Initial revision --- utils/admin_users.php | 203 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 utils/admin_users.php (limited to 'utils/admin_users.php') diff --git a/utils/admin_users.php b/utils/admin_users.php new file mode 100644 index 0000000..c2e742f --- /dev/null +++ b/utils/admin_users.php @@ -0,0 +1,203 @@ +

Users

+ + + +
Add user
+findUser($newuserid)) { + $user = new User($newuserid, + sha1(md5($newpassword1)), + $newmodule_users, + $newmodule_news, + $newmodule_events, + $newmodule_guestbook, + $newmodule_gallery, + $newmodule_user, + $newmodule_newsletter); + $users->add($user); + $users->write(); + echo "

User " . $newuserid . " added successfully.

\n"; + } else { + echo "

ERROR: User " . $newuserid . " already exists.

\n"; + } + } else { + echo "

ERROR: Passwords do not match.

\n"; + } +} +?> +
+

+ UserID: +

+

+ /> + Add/edit.delete users:
+ /> + Change password:
+ /> + Add news:
+ /> + Add events:
+ /> + Add images in gallery:
+ /> + Send newsletter:
+ /> + Modify guestbook +

+

+ New password: + +

+

+ Confirm password: + +

+

+ +

+
+ +
Edit user
+findUser($edituserid); + $user->users = $module_users; + $user->user = $module_user; + $user->news = $module_news; + $user->events = $module_events; + $user->gallery = $module_gallery; + $user->newsletter = $module_newsletter; + $user->guestbook = $module_guestbook; + if($password1 != "") { + if($password1 == $password2) { + $user->password = sha1(md5($password1)); + $users->add($user); + $users->write(); + echo "

User " . $edituserid . " successfully updated.

\n"; + } else { + echo "

ERROR: Passwords do not match

\n"; + $task = "edituser"; + } + } else { + $users->add($user); + $users->write(); + echo "

User " . $edituserid . " successfully updated. Password left untouched.

\n"; + } +} +?> +findUser($edituserid); +?> +
+

+ UserID: +

+

+ users == "on") echo "checked"; ?>/> + Add/edit.delete users:
+ user == "on") echo "checked"; ?>/> + Change password:
+ news == "on") echo "checked"; ?>/> + Add news:
+ events == "on") echo "checked"; ?>/> + Add events:
+ gallery == "on") echo "checked"; ?>/> + Add images in gallery:
+ newsletter == "on") echo "checked"; ?>/> + Send newsletter:
+ guestbook == "on") echo "checked"; ?>/> + Modify guestbook +

+

+ New password: + +

+

+ Confirm password: + +

+

+ +

+
+ +
+

+ Select the user you want to edit:
+ + +

+
+ +
Delete user
+ +Are you sure you want to delete the user?
+
+ + +
+
+ + +
+ + +deleteUser($deleteuserid)) { + echo "

User ".$deleteuserid." deleted successfully.

\n"; + } +} +?> +
+

+ Select the user you want to delete:
+ + +

+
-- cgit v1.2.3