// Tussen de **** aanpassen naar eigen smaak
// Let op de "" en ;
// Verder naar beneden staat natuurlijk ook nog wat tekst...
// ****************************
$pagesize = 10;
$photographer_name = "Alex Le Heux";
$photographer_url = "http://www.baldumasque.nl";
$page_title = "15th Bal Du Masque Photos";
// ****************************
?>
echo $page_title; ?>
BAL du MASQUE
Fifteenth Bal
15th of May 2010
Pictures taken by Alex Le Heux
$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);
?>