Add( ADMIN_ROLE ); foreach( $userUpdateList as $userID ) { if ( in_array( $userID, $adminOnList ) ) $usersToGrant->Add( $userID ) ; else $usersToRevoke->Add( $userID ); } $site->GrantRoleMembershipsToUsers( $roleToUpdate, $usersToGrant ); $site->RevokeRoleMembershipsFromUsers( $roleToUpdate, $usersToRevoke ); $confirmationMsg = $confSuccessfulRoleUpdate; // Update author role. $usersToGrant->Clear(); $usersToRevoke->Clear(); $roleToUpdate->SetItem( 0, AUTHOR_ROLE ); foreach( $userUpdateList as $userID ) { if ( in_array( $userID, $authorOnList ) ) $usersToGrant->Add( $userID ) ; else $usersToRevoke->Add( $userID ); } $site->GrantRoleMembershipsToUsers( $roleToUpdate, $usersToGrant ); $site->RevokeRoleMembershipsFromUsers( $roleToUpdate, $usersToRevoke ); $confirmationMsg = $confSuccessfulRoleUpdate; } } catch ( MgException $e ) { CheckForFatalMgException( $e ); $errorMsg = $e->GetMessage(); } catch ( Exception $e ) { $errorMsg = $e->getMessage(); } // Load the display table. try { $users = GetUsers(); $userCount = sizeof( $users ); $currPage = GetPageNumber( $users, $selectedUser, $pageSize ); GetPageRange( $currPage, $userCount, $pageSize, $firstPageIndex, $lastPageIndex ); LoadUserRolesTable( $userRolesTable, $firstPageIndex, $lastPageIndex ); if ( !array_key_exists( $selectedUser, $userRolesTable ) && $userCount > 0 ) $selectedUser = $users[ $firstPageIndex ]; // If not our first time here, use the submitted data if ( !FirstTimeHere( $pageName ) ) { foreach ( $userRolesTable as $userID => $val ) { if ( in_array( $userID, $userUpdateList ) ) { $val->adminOn = in_array( $userID, $adminOnList ) ? true : false; $val->authorOn = in_array( $userID, $authorOnList ) ? true : false; } } } } catch ( MgException $e ) { CheckForFatalMgException( $e ); if ( empty( $errorMsg ) ) $errorMsg = $e->GetMessage(); } catch ( Exception $e ) { if ( empty( $errorMsg ) ) $errorMsg = $e->getMessage(); } ?>
Users Groups  

label = "Edit Roles"; $button->icon = "images/edit.gif"; $button->action = "SetElementValue('".NEXT_PAGE_ID."', 'assignroles.php' );"; $buttons[0] = $button; DisplayToolbar( $buttons, $formName ); ?> ' : ''; $idSortIconStr = ( $sortColumn === ID_SORT_COLUMN ) ? ' ' : ''; $sortDirectionStr = "SetElementValue( '".$sortDirectionID."', '".GetSortDirection( $sortDirection )."' );"; $sortByNameStr = "SetElementValue( '".$sortColumnID."', '".NAME_SORT_COLUMN."');"; $sortByIDStr = "SetElementValue( '".$sortColumnID."', '".ID_SORT_COLUMN."');"; ?> $val ) { CreateListOfGroupHyperlinksForTable( $val->adminFromGroups, $numAdminGroups, $adminGroupList ); CreateListOfGroupHyperlinksForTable( $val->authorFromGroups, $numAuthorGroups, $authorGroupList ); $tdClass = ($key === $highlightedUser) ? 'highlightedDataCell' : 'dataCell'; ?>
User Name User ID Administrator Role Map Author Role
    User Level Group Level User Level Group Level
name; ?> adminOn) { echo 'checked="checked"'; }?>> 0) { echo 'checked="checked"'; }?>> authorOn) { echo 'checked="checked"'; }?>> 0) { echo 'checked="checked"'; }?>>