Пример #1
0
    $searchStArr = json_decode($stArrSearchJson, true);
    $stArr = array_merge($searchStArr, $collStArr);
} elseif ($stArrCollJson && !$stArrSearchJson) {
    $collArray = $collManager->getSearchTerms();
    $collStArr = json_decode($stArrCollJson, true);
    $stArr = array_merge($collArray, $collStArr);
    $stArrSearchJson = json_encode($collArray);
} else {
    $collArray = $collManager->getSearchTerms();
    $collStArr = $collManager->getSearchTerms();
    $stArr = array_merge($collArray, $collStArr);
    $stArrSearchJson = json_encode($collArray);
    $stArrCollJson = json_encode($collArray);
}
$stArrJson = json_encode($stArr);
$collManager->setSearchTermsArr($stArr);
$collManager->setSorting($sortField1, $sortField2, $sortOrder);
$recArr = $collManager->getTableSpecimenMap($occIndex, 1000);
//Array(IID,Array(fieldName,value))
$targetClid = $collManager->getSearchTerm("targetclid");
if ($recArr) {
    $qryCnt = $collManager->getRecordCnt();
    $hrefPrefix = 'listtabledisplay.php?usecookies=false&starr=' . $stArrSearchJson . '&jsoncollstarr=' . $stArrCollJson . (array_key_exists('targettid', $_REQUEST) ? '&targettid=' . $_REQUEST["targettid"] : '') . '&sortfield1=' . $sortField1 . '&sortfield2=' . $sortField2 . '&sortorder=' . $sortOrder . '&occindex=';
    $navStr = '<div style="float:right;">';
    if ($occIndex >= 1000) {
        $navStr .= "<a href='" . $hrefPrefix . ($occIndex - 1000) . "' title='Previous 1000 records'>&lt;&lt;</a>";
    }
    $navStr .= ' | ';
    $navStr .= $occIndex + 1 . '-' . ($qryCnt < 1000 + $occIndex ? $qryCnt : 1000 + $occIndex) . ' of ' . $qryCnt . ' records';
    $navStr .= ' | ';
    if ($qryCnt > 1000 + $occIndex) {