_set_users("add", $userid, $groupid); break; case ' DELETE ': _page_sechead("exhibit.png", "User Management"); _set_users("delete", $userid, $groupid); break; default: _page_sechead("exhibit.png", "User Management"); break; } _display_users(); break; case 'rolls': default: $roll = $_REQUEST['roll']; $library = $_REQUEST['library']; $public = $_REQUEST['public']; $group = $_REQUEST['group']; if (!isset($roll) and !isset($library)) { _page_sechead("exhibit.png", "Roll Management"); _display_permissions(); } elseif (isset($public) and isset($group)) { _page_sechead("exhibit.png", "Roll Management"); _set_permissions($roll, $library, $public, $group); } else { _page_sechead("error.png", "An error occurred updating permissions."); _display_permissions(); } break; } _page_footer();
function _set_permissions($roll, $library, $public, $group) { $update_query = "UPDATE exhibit_Permissions SET Public='" . $public . "'," . "GroupID='" . $group . "' WHERE iPhotoLibraryID='" . $library . "' AND RollID='" . $roll . "'"; __query($update_query, "", ""); _display_permissions(); }