// Tussen de **** aanpassen naar eigen smaak
// Let op de "" en ;
// Verder naar beneden staat natuurlijk ook nog wat tekst...
// ****************************
$pagesize = 10;
$photographer_name = "Xander Hoose";
$photographer_url = "http://www.redux.net/";
$page_title = "Fetish Cabaret Photos";
// ****************************
?>
echo $page_title; ?>
$dir_handle = @opendir(".") or die("Unable to open photo directory");
$i = 0;
foreach (glob("*.JPG") as $filename) {
$files[$i] = $filename;
$i++;
}
$nrfiles = $i;
$nrpages = round($nrfiles/$pagesize);
$page = $_GET["page"];
// TODO: Pages
if ($page == 0) {
$page = 1;
}
if ($page > 1) {
printf("Previous", $page-1);
printf(" ");
} else {
printf("Previous ");
}
for ($i = 1; $i <= $nrpages; $i++) {
printf(" %d", $i, $i);
}
if ($page < $nrpages) {
printf(" ");
printf("Next", $page+1);
} else {
printf(" Next");
}
printf("
\n");
for ($i = 0; $i < $pagesize; $i++) {
if ($files[$i + ($page - 1) * $pagesize] != "") {
printf("\n", $files[$i + ($page - 1) * $pagesize]);
}
}
closedir($dir_handle);
printf("Photos by %s
", $photographer_url, $photographer_name);
?>