read()) !== false) {
if($entry == '.' || $entry == '..' || !strstr($entry, '.')) {
continue;
}
$images[] = $entry;
}
return $images;
}
if(isset($_GET['p'])) {
$pagination_start = intval($_GET['p']);
} else {
$pagination_start = 0;
}
$images_per_page = 20;
$path = "tattoos";
$docroot = "$path";
$images = getImages($path);
$images_start = $pagination_start * $images_per_page;
$images_end = $images_start + $images_per_page;
$pages_total = ceil(count($images) / $images_per_page);
for($i = $images_start; $i < $images_end; $i++) {
$image = $images[$i];
echo "";
$filename = explode('.', $image);
echo "";
echo "\n";
}
echo "