Пример #1
0
if ($isAdmin || array_key_exists("CollAdmin", $userRights) && in_array($collId, $userRights["CollAdmin"])) {
    $editable = true;
}
$status = "";
if ($editable) {
    if ($download) {
        $reviewManager->downloadRecords($_REQUEST);
        exit;
    } elseif ($submitStr == 'Perform Update') {
        $reviewManager->applyAction($_POST);
    } elseif ($submitStr == 'Delete Edits') {
        $reviewManager->deleteEdits($_POST);
    }
}
if ($mode == 'export') {
    $reviewManager->exportCsvFile();
}
$recCnt = $reviewManager->getRecCnt();
$subCnt = $limitCnt * ($pageNum + 1);
if ($recCnt < ($pageNum + 1) * $limitCnt) {
    $subCnt = $recCnt - $pageNum * $limitCnt;
}
$navPageBase = 'editreviewer.php?collid=' . $collId . '&mode=' . $mode . '&fastatus=' . $faStatus . '&frstatus=' . $frStatus . '&editor=' . $editorUid;
$navStr = '<div style="float:right;">';
if ($pageNum) {
    $navStr .= '<a href="' . $navPageBase . '&pagenum=' . ($pageNum - 1) . '&limitcnt=' . $limitCnt . '" title="Previous ' . $limitCnt . ' records">&lt;&lt;</a>';
} else {
    $navStr .= '&lt;&lt;';
}
$navStr .= ' | ';
$navStr .= $pageNum * $limitCnt . '-' . $subCnt . ' of ' . $recCnt . ' records';
Пример #2
0
    $isEditor = true;
} elseif ($reviewManager->getObsUid()) {
    $isEditor = true;
}
$statusStr = "";
if ($isEditor) {
    if (array_key_exists('updatesubmit', $_POST)) {
        if (!$reviewManager->updateRecords($_POST)) {
            $statusStr = '<br>' . implode('</br><br>', $reviewManager->getWarningArr()) . '</br>';
        }
    } elseif (array_key_exists('delsubmit', $_POST)) {
        $idStr = implode(',', $_POST['id']);
        $reviewManager->deleteEdits($idStr);
    } elseif (array_key_exists('dlsubmit', $_POST)) {
        $idStr = implode(',', $_POST['id']);
        if ($reviewManager->exportCsvFile($idStr)) {
            exit;
        } else {
            $statusStr = $reviewManager->getErrorMessage();
        }
    } elseif (array_key_exists('dlallsubmit', $_POST)) {
        if ($reviewManager->exportCsvFile('', true)) {
            exit;
        } else {
            $statusStr = $reviewManager->getErrorMessage();
        }
    }
}
$recCnt = $reviewManager->getEditCnt();
$subCnt = $limitCnt * ($pageNum + 1);
if ($subCnt > $recCnt) {