Example #1
0
    }
    if (array_key_exists($viewSelectionID, $_POST)) {
        $viewSelection = $_POST[$viewSelectionID] == 'true';
    }
    // Are we switching to another page?
    $nextPage = GetHiddenVar(NEXT_PAGE_ID);
    if ($nextPage != "") {
        $selectedLog = $selectedItem;
        SwitchToPage($nextPage);
    }
    // Create a ServerAdmin object.
    $serverAdmin = new MgServerAdmin();
    $serverAdmin->Open($selectedServer, $userInfo);
    // Are we deleting the selected file?
    if (CheckForDeleteSelection()) {
        $serverAdmin->DeleteLog($selectedItem);
        $confirmationMsg = sprintf($confSuccessfulDeletion, $selectedItem);
    }
} catch (MgException $e) {
    CheckForFatalMgException($e);
    $errorMsg = $e->GetExceptionMessage();
} catch (Exception $e) {
    $errorMsg = $e->getMessage();
}
// Load display data
try {
    if (!$serverRec->poweredUp) {
        throw new Exception(sprintf($errServerIsDown, $selectedServer));
    }
    if ($selectedLog != ACTIVE_LOGS) {
        $logFiles = GetLogFiles($serverAdmin, $selectedLog);