0)) {$ref=$result[$pos-1]["ref"];} if (($go=="next") && ($pos<($n-1))) {$ref=$result[$pos+1]["ref"];if (($pos+1)>=($offset+72)) {$offset=$pos+1;}} # move to next page if we've advanced far enough } } # Check access permissions for this new resource, if an external user. if ($k!="" && !check_access_key($ref, $k)) {$ref = $origref;} # Cancel the move. } $resource=get_resource_data($ref); if ($resource===false) { exit(escape($lang['resourcenotfound'])); } $ext="jpg"; if ($ext!="" && $ext!="gif" && $ext!="jpg" && $ext!="png") {$ext="jpg";$border=false;} # Supports types that have been created using ImageMagick # Check permissions (error message is not pretty but they shouldn't ever arrive at this page unless entering a URL manually) $access=get_resource_access($ref); if($access == RESOURCE_ACCESS_CONFIDENTIAL) { exit(escape($lang["error-permissiondenied"])); } $use_watermark=check_use_watermark(); hook('replacepreview'); # Locate the resource if($resource['has_image'] === 0) { // No preview. If configured, try and use a preview from a related resource $pullresource = related_resource_pull($resource); if($pullresource !== false) { $ref = $pullresource["ref"]; $resource = $pullresource; $access = get_resource_access($pullresource); } } // Full screen preview should always use screen size in preference to preview size if possible $previewsizes = ["scr", "pre"]; $imagepre = get_resource_preview($resource,$previewsizes, $access, $use_watermark, $page, true, $alternative); if($imagepre) { $url = $imagepre["url"] . "&iaccept=on"; } else { $url = $GLOBALS["baseurl_short"] . 'gfx/no_preview/default.png'; } // Here we check for the presence or otherwise of the relevant multi-page preview files (for PDFs and potentially others) // The resulting values control the presence or otherwise of the navigation chevrons used for Next and Previous page browsing // Multi-page preview files for the second page onwards will either be "scr" or "pre" size. // The size to look for here is governed by $resource_view_use_pre. If false then "scr" else true means "pre" //Previous page check $previouspage = $page - 1; if (!file_exists(get_resource_path($ref,true,$previewsizes[0],false,$ext,-1,$previouspage,$use_watermark,"",$alternative)) && !file_exists(get_resource_path($ref,true,"",false,$ext,-1,$previouspage,$use_watermark,"",$alternative)) && !file_exists(get_resource_path($ref,true,$previewsizes[1],false,$ext,-1,$previouspage,$use_watermark,"",$alternative))) { $previouspage = -1; } //Next page check $nextpage = $page + 1; if (!file_exists(get_resource_path($ref,true,$previewsizes[0],false,$ext,-1,$nextpage,$use_watermark,"",$alternative)) && !file_exists(get_resource_path($ref,true,$previewsizes[1],false,$ext,-1,$nextpage,$use_watermark,"",$alternative))) { $nextpage = -1; } // get mp3 paths if necessary and set $use_mp3_player switch if (!(isset($resource['is_transcoding']) && $resource['is_transcoding']==1) && (in_array($resource["file_extension"],$ffmpeg_audio_extensions) || $resource["file_extension"]=="mp3") && $mp3_player){ $use_mp3_player=true; } else { $use_mp3_player=false; } if ($use_mp3_player){ $mp3realpath=get_resource_path($ref,true,"",false,"mp3"); if (file_exists($mp3realpath)){ $mp3path=get_resource_path($ref,false,"",false,"mp3"); } } include "../include/header.php"; if (!hook("fullpreviewresultnav")) { if (!hook("replacepreviewbacktoview")) { ?>

&thumbs=show&k=&">         0) { ?>   $ref, "k" => $k, "from" => getval("from",""), "search" => $search, "offset" => $offset, "order_by" => $order_by, "sort" => $sort, "archive" => $archive, "thumbs" => $thumbs_show); ?>           $alt_previous):"");?>" title="">   ""))."&".hook("viewextraurl");?>">   $alt_next):"");?>" title="">           &ref=&k=&search=&offset=&order_by=&sort=&thumbs=show&archive=&go=previous&" title="">   search=&k=&offset=&order_by=&sort=&thumbs=show&">   &ref=&k=&search=&offset=&order_by=&sort=&thumbs=show&archive=&go=next&" title="">               :

$ref, "alternative" => $alternative, "ext" => $ext, "k" => $k, "search" => $search, "offset" => $offset, "order_by" => $order_by, "sort" => $sort, "archive" => $archive ); if($saved_thumbs_state=="show") { $urlparams["thumbs"] = "show"; } if (!hook("previewimage")) { if (!hook("previewimage2")) { ?>
" class="PDFnav pagePrev"><     search=&offset=&order_by=&sort=&thumbs=show&archive=&k=&"> <?php echo escape(i18n_get_translated($resource['field'.$view_title_field] ?? " src="" 0) { ?> data-original="" alt="" /> " class="PDFnav pageNext">>
0){ echo ""; } } if(count(canSeeAnnotationsFields()) > 0 && isset($image_height) && isset($image_width)) { ?>