From 61148024a245a7bd3cdc9f978791b510cde40961 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Tue, 22 Dec 2009 19:01:00 +0000 Subject: (OC) Edit admin permissions with jQuery working git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@393 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- admin/admins/functions.php | 101 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 92 insertions(+), 9 deletions(-) (limited to 'admin/admins/functions.php') diff --git a/admin/admins/functions.php b/admin/admins/functions.php index 0cc6513..c44d05a 100644 --- a/admin/admins/functions.php +++ b/admin/admins/functions.php @@ -1,3 +1,26 @@ + + + +?>
Cancel
@@ -71,11 +96,66 @@ +
+
+
+ + + + + + + +
Everything elseAdjutantQuartermaster
+ + "; + else + echo ""; + ?> + + + "; + else + echo ""; + ?> + + + "; + else + echo ""; + ?> +
+
+ +

Show/Hide Permissions

+ Query("UPDATE `bayonet_users` SET `username` = '$username', `level` = '$level' WHERE `user_id` = '$user_id' LIMIT 1"); + $db->Query("UPDATE `bayonet_users` SET `username` = '$username', `level` = '$level', `all` = '$all', `adjutant` = '$adjutant', `quartermaster` = '$quartermaster' WHERE `user_id` = '$user_id' LIMIT 1"); echo "Admin, '$username' level '$level' has been edited.\n

Please wait while you are redirected.

Click here if you don't feel like waiting."; // 3 second redirect to go back to the edit page - PageRedirect(3, "?op=admins"); + PageRedirect(2, "?op=admins&edit={$user_id}"); return; } $result = $db->Query("SELECT * FROM `bayonet_users` WHERE `user_id` = '$user_id' LIMIT 1"); - while(($rows = $db->fetch($result))!=false) - { - $admin = $rows; - } - + $admin = $db->fetch($result); + if($maxLevel < $admin['level']){ ReportError("You do not have permission to access this user."); return; @@ -141,6 +222,8 @@ +
+