예제 #1
0
            $mappingName = $_POST[$mappingNameID];
        }
        if (array_key_exists($locationID, $_POST)) {
            $location = $_POST[$locationID];
        }
        // Validate inputs.
        if (empty($mappingName)) {
            throw new Exception($errMappingNameMissing);
        }
        if (empty($location)) {
            throw new Exception($errLocationMissing);
        }
        // Update parameters of user.
        SetUnmanagedDataMapping($serverAdmin, $mappingName, $location);
        if ($mappingName != $selectedMapping) {
            DeleteUnmanagedDataMapping($serverAdmin, $selectedMapping);
        }
        $serverAdmin->Close();
        // Everything is OK.
        $confirmationMsg = sprintf($confSuccessfulAddition, $mappingName);
        $selectedMapping = $mappingName;
        SaveSessionVars();
        header('Path to External File:  unmanageddatamanagement.php?' . strip_tags(SID));
        exit;
    }
} catch (MgException $e) {
    CheckForFatalMgException($e);
    $errorMsg = $e->GetExceptionMessage();
} catch (Exception $e) {
    $errorMsg = $e->getMessage();
}
예제 #2
0
        }
    }
    SetUserSortDirection($sortDirection);
    if (array_key_exists($sortColumnID, $_GET)) {
        $sortColumn = $_GET[$sortColumnID];
    } else {
        if (array_key_exists($sortColumnID, $_POST)) {
            $sortColumn = $_POST[$sortColumnID];
        }
    }
    SetUserSortColumn($sortColumn);
    // Are we switching to another page?
    CheckForPageSwitch();
    // Are we deleting the selected mapping?
    //if ( CheckForDeleteSelection() && DeleteUnmanagedDataMapping( $serverAdmin, $mappings, $selectedMapping ) )
    if (CheckForDeleteSelection() && DeleteUnmanagedDataMapping($serverAdmin, $selectedMapping)) {
        $confirmationMsg = sprintf($confSuccessfulDeletion, $selectedMapping);
        $mappings = GetUnmanagedDataMappings($serverAdmin);
    }
    $serverAdmin->Close();
} catch (MgException $e) {
    CheckForFatalMgException($e);
    $errorMsg = $e->GetExceptionMessage();
} catch (Exception $e) {
    $errorMsg = $e->getMessage();
}
// Load display data
try {
    // sort mappings
    if ($sortColumn == NAME_SORT_COLUMN) {
        if ($sortDirection == ASCENDING_SORT_DIRECTION) {