= 1 ) ? $pageNum : 1;
$prevPage = ($pageNum - 1 > 0) ? ( $pageNum - 1 ) : false;
$nextPage = ($pageNum + 1 <= $numPages) ? ( $pageNum + 1 ) : false;
}
/* ------------------------------- begin html ------------------------------ */
?>
1 ) {
// back
if( $prevPage )
echo "
<< ";
else
echo "
<< ";
// page numbers
for ($i = 1; $i <= $numPages; $i++) {
if( $i == $pageNum )
echo "
$i ";
else
echo "
$i ";
}
// forward
if( $nextPage )
echo "
>> ";
else
echo "
>> ";
}
?>
no images in target folder";
// print file array and container div
echo "
";
$count = 1;
foreach( $images as $file ) {
// check range
$inRange = ( $count > ($pageNum-1) * $imagesPerPage && $count <= $pageNum * $imagesPerPage );
if( !$paginate || $inRange ) {
$file = $folder.$file;
$url = rawurlencode( $file );
echo "
";
}
$count++;
}
echo "
";
?>