$filter_by_type, "filter_by_usageoption" => $filter_by_usageoption, ); // Logs can sometimes contain confidential information and the user looking at them must have admin permissions set. // Some log records can be viewed by all users. Ensure access control by allowing only white listed log codes to bypass // permissions checks. $safe_log_codes = array(LOG_CODE_DOWNLOADED); $resource_access = get_resource_access($ref); $bypass_permission_check = in_array($filter_by_type, $safe_log_codes) && in_array($resource_access, array(0, 1)); if (!checkperm('v') && !$bypass_permission_check) { die($lang['log-adminpermissionsrequired']); } # fetch the current search (for finding simlar matches) $search = getval("search", ""); $order_by = getval("order_by", "relevance"); $search_offset = getval("search_offset", 0, true); $restypes = getval("restypes", ""); if (strpos($search, "!") !== false) { $restypes = ""; } $archive = getval("archive", 0, true); $default_sort_direction = "DESC"; if (substr($order_by, 0, 5) == "field") { $default_sort_direction = "ASC"; } $sort = getval("sort", $default_sort_direction); $offset = getval("offset", 0, true); $per_page = getval("per_page", $default_perpage_list, true); $per_page = ($per_page == 0) ? $default_perpage_list : $per_page; rs_setcookie('per_page', $per_page); // When filtering by download records only the table output will be slightly different, showing only the following columns: // date, user, usage option and usage reason $filter_dld_records_only = ($filter_by_type == LOG_CODE_DOWNLOADED); # next / previous resource browsing $go = getval("search_go", ""); if ($go != "") { $origref = $ref; # Store the reference of the resource before we move, in case we need to revert this. # Re-run the search and locate the next and previous records. $modified_result_set = hook("modifypagingresult"); if ($modified_result_set) { $result = $modified_result_set; } else { $result = do_search($search, $restypes, $order_by, $archive, 240 + $search_offset + 1, $sort, false, DEPRECATED_STARSEARCH); } if (is_array($result)) { # Locate this resource $pos = -1; for ($n = 0; $n < count($result); $n++) { if (isset($result[$n]["ref"]) && $result[$n]["ref"] == $ref) { $pos = $n; } } if ($pos != -1) { if (($go == "previous") && ($pos > 0)) { $ref = $result[$pos - 1]["ref"]; } if (($go == "next") && ($pos < ($n - 1))) { $ref = $result[$pos + 1]["ref"]; if (($pos + 1) >= ($search_offset + 72)) { $search_offset = $pos + 1; } } # move to next page if we've advanced far enough } else { ?> $ref, "search" => $search, "search_offset" => $search_offset, "order_by" => $order_by, "sort" => $sort, "archive" => $archive, "k" => $k, "search_go" => $go, ); if ($ref === "") { $error = $lang['resourcenotfound']; include "../include/header.php"; $onload_message = array("title" => $lang["error"], "text" => $error); include "../include/footer.php"; exit(); } include "../include/header.php"; ?>
" onclick="return CentralSpaceLoad(this,true);">
" onclick="return ModalLoad(this,true);">