$usersNotSelectedID = 'usersNotSelected'; $errorMsg = ""; $confirmationMsg = ""; // Is this our first time here? if (FirstTimeHere($pageName)) { // Was the selected group passed in the URL? if (array_key_exists($selectedGroupID, $_GET)) { $selectedGroup = $_GET[$selectedGroupID]; } // Get info for selected user $selectedGroupData = GetDataForGroup($selectedGroup, true); if ($selectedGroupData == NULL) { throw new Exception(sprintf($errNotFound, $selectedGroup)); } $description = $selectedGroupData->description; CopyArray($selectedGroupData->users, $usersSelected); $allUsers = GetUsers(); $usersNotSelected = array_diff($allUsers, $usersSelected); } else { // Get submitted data if (array_key_exists($selectedGroupID, $_POST)) { $selectedGroup = $_POST[$selectedGroupID]; } if (array_key_exists($descriptionID, $_POST)) { $description = $_POST[$descriptionID]; } if (array_key_exists($usersSelectedID, $_POST)) { $usersSelected = $_POST[$usersSelectedID]; } if (array_key_exists($usersNotSelectedID, $_POST)) { $usersNotSelected = $_POST[$usersNotSelectedID];
$confirmationMsg = ""; // Is this our first time here? if (FirstTimeHere($pageName)) { // Was the selected user passed in the URL? if (array_key_exists($selectedUserID, $_GET)) { $selectedUser = $_GET[$selectedUserID]; } // Get info for selected user $selectedUserData = GetDataForUser($selectedUser, true); if ($selectedUserData == NULL) { throw new Exception(sprintf($errNotFound, $selectedUser)); } $userID = $selectedUser; $userName = $selectedUserData->name; $description = $selectedUserData->description; CopyArray($selectedUserData->groups, $groupsSelected); $allGroups = GetGroups(); $groupsNotSelected = array_diff($allGroups, $groupsSelected); } else { // Get submitted data if (array_key_exists($userNameID, $_POST)) { $userName = $_POST[$userNameID]; } if (array_key_exists($userIDID, $_POST)) { $userID = $_POST[$userIDID]; } if (array_key_exists($passwordID, $_POST)) { $password = $_POST[$passwordID]; } if (array_key_exists($passwordConfirmationID, $_POST)) { $passwordConfirmation = $_POST[$passwordConfirmationID];
function LogPropsRecord($propSectionStr, $enabledPropStr, $filenamePropStr, $parmsPropStr, $allPossibleParms) { $this->propSectionStr = $propSectionStr; $this->enabledPropStr = $enabledPropStr; $this->filenamePropStr = $filenamePropStr; $this->parmsPropStr = $parmsPropStr; $this->enabled = false; $this->filename = ""; $this->parmsSelected = array(); $this->parmsNotSelected = array(); CopyArray($allPossibleParms, $this->allPossibleParms); }