Nieuw lid |
|
Oke, ik post wel even de scripts:
Album.php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <?
if(is_dir($_GET['album1'])){
// configuratie
$aantalFotos = 18; // aantal fotos per pagina
$originalPath = $_GET['/album1']; //de map aangeroepen in de url
$path = $_GET['/album1']; // path naar de foto
$fotoArray = array();
$d = dir("$path");
while($entry=$d->read()) {
if(eregi(".jpg|.jpeg|.gif|.bmp|.png", $entry)){
ClearStatCache();
$foto = $path . "/" . $entry ;
$fotoArray[] = $foto;
}
}
$d->close();
$count = count($fotoArray);
$pathspatie = str_replace("_", " ", $originalPath);
?>
<html>
<head>
<title>Fotos</title>
</head>
<body>
<table width="100%"><tr><td align="center" width="100%">
<?
// 1 FOTO PER PAGINA
if((isset($_GET['fotoID'])) AND (intval($_GET['fotoID']>=0)) AND (intval($_GET['fotoID'] < $count))){
$showFoto = intval($_GET['fotoID']);
echo "<table width='40%'><tr><td colspan='3' align='center'><b>" . $pathspatie . "</b>
<br><br><small>Foto " . ($showFoto + 1) . " / " . $count . "</small></big></font> </td></tr><tr>";
echo "<tr><td colspan='3' align='center'><a href='" . $fotoArray[$showFoto] . "' target='_blanc'><img src='" . $fotoArray[$showFoto] . "' height='300' border='0'></a></td></tr>";
echo "<tr><td width='40%'>";
if($showFoto!=0){
$prevFoto = ($showFoto - 1);
echo "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&fotoID=" . $prevFoto . "'>prev</a> ";
} // end if
echo "</td><td width='33%'>";
$pageNR = floor($_GET['fotoID'] / $aantalFotos);
$pageNR = $pageNR * 18;
echo "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&vanafFoto=" . $pageNR . "'>list</a> ";
echo "</td><td align='right'>";
if($showFoto!=($count -1)){
$nextFoto = ($showFoto + 1);
echo "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&fotoID=" . $nextFoto . "'>next</a> ";
} // end if
echo "</td></tr></table>";
}
// X FOTOS PER PAGINA
else {
// configuratie
$clm = 3; // Aantal kolommen
$countFotos = count($fotoArray);
$thumbPath = $path . "thumbsalbum1"; //Path naar thumps
$path2 = $path . "/";
echo "<br><table ><tr>";
echo "<td align='center' colspan='" . $clm . "'>";
// navigatie
$navigation;
if($countFotos < ($aantalFotos + 1)){
$begin = 0;
$eind = $countFotos;
} // end if
else {
$aantalPages = ceil($countFotos / $aantalFotos) ;
for($i=1; $i < $aantalPages + 1; $i++){
$pageNR = ($i - 1) * $aantalFotos;
if($pageNR==$_GET["vanafFoto"]){
$navigation .= "<small><font color='#990000'>" . $i . "</font></small> ";
}
else {
$navigation .= "<a href='?page=album&boek=" . $originalPath . "&vanafFoto=" . $pageNR . "'>" . $i . "</a> ";
}
} // end for
if((isset($_GET['vanafFoto'])) AND (intval($_GET['vanafFoto']>=0)) AND (intval($_GET['vanafFoto'] < $countFotos))){
$begin = intval($_GET['vanafFoto']);
if(($begin + $aantalFotos) <= $countFotos){
$eind = ($begin + $aantalFotos);
} // end if
else {
$eind = $countFotos;
} // end else
} // end if
else {
$begin = 0;
$eind = $aantalFotos;
} // end else
$countFotos = count($fotoArray);
// path naar echte foto
} // end else
echo "<table border='0' cellpadding='0' cellspacing='2'><tr><td ><b>" . $pathspatie . "</b> <small>(" . $count . ")</small>
<br><br><center><small>Pictures " . ($begin + 1) . " - " . $eind . "</small></center></td></tr></table>";
if(($begin - $aantalFotos) >= 0){
$navigation = "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&vanafFoto=" . ($begin - $aantalFotos) . "'><</a> " . $navigation;
} // end if
if(($begin + $aantalFotos) < $count){
$navigation .= " <a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&vanafFoto=" . ($begin + $aantalFotos) . "'>></a>";
} // end if
echo $navigation . "<br><br>";
echo "</td></tr><tr>";
$fotonr = 1;
for($i=$begin; $i < $eind; $i++){
$thumb = str_replace($path2, $thumbPath, $fotoArray[$i]);
echo "<td align='center'><a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&fotoID=" . $i . "'><img border='0' src='" . $thumb . "' height='100'><br>";
echo "</td>";
$fotonr++;
if($fotonr == ($clm + 1)){
echo "</tr>\n<tr>";
$fotonr = 1;
} // end if
} // end for
echo "</tr>";
echo "<td align='center' colspan='" . $clm . "'>";
echo $navigation;
echo "</td></tr><tr>";
echo "</table>";
} // end else if
} // end if
else {
echo "Dit fotoalbum bestaat niet";
} // end else
?>
</td></tr></table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <? // configuratie $aantalFotos = 18; // aantal fotos per pagina $originalPath = $_GET['/album1']; //de map aangeroepen in de url $path = $_GET['/album1']; // path naar de foto while($entry=$d->read()) { if(eregi(".jpg|.jpeg|.gif|.bmp|.png", $entry)){ $foto = $path . "/" . $entry ; $fotoArray[] = $foto; } } $d->close(); $count = count($fotoArray); $pathspatie = str_replace("_", " ", $originalPath); ?> <html> <head> <title>Fotos</title> </head> <body> <table width="100%"><tr><td align="center" width="100%"> <? // 1 FOTO PER PAGINA if((isset($_GET['fotoID'])) AND (intval($_GET['fotoID']>=0)) AND (intval($_GET['fotoID'] < $count))){ $showFoto = intval($_GET['fotoID']); echo "<table width='40%'><tr><td colspan='3' align='center'><b>" . $pathspatie . "</b> <br><br><small>Foto " . ($showFoto + 1) . " / " . $count . "</small></big></font> </td></tr><tr>"; echo "<tr><td colspan='3' align='center'><a href='" . $fotoArray[$showFoto] . "' target='_blanc'><img src='" . $fotoArray[$showFoto] . "' height='300' border='0'></a></td></tr>"; echo "<tr><td width='40%'>"; if($showFoto!=0){ $prevFoto = ($showFoto - 1); echo "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&fotoID=" . $prevFoto . "'>prev</a> "; } // end if echo "</td><td width='33%'>"; $pageNR = floor($_GET['fotoID'] / $aantalFotos); $pageNR = $pageNR * 18; echo "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&vanafFoto=" . $pageNR . "'>list</a> "; echo "</td><td align='right'>"; if($showFoto!=($count -1)){ $nextFoto = ($showFoto + 1); echo "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&fotoID=" . $nextFoto . "'>next</a> "; } // end if echo "</td></tr></table>"; } // X FOTOS PER PAGINA else { // configuratie $clm = 3; // Aantal kolommen $countFotos = count($fotoArray); $thumbPath = $path . "thumbsalbum1"; //Path naar thumps $path2 = $path . "/"; echo "<td align='center' colspan='" . $clm . "'>"; // navigatie $navigation; if($countFotos < ($aantalFotos + 1)){ $begin = 0; $eind = $countFotos; } // end if else { $aantalPages = ceil($countFotos / $aantalFotos) ; for($i=1; $i < $aantalPages + 1; $i++){ $pageNR = ($i - 1) * $aantalFotos; if($pageNR==$_GET["vanafFoto"]){ $navigation .= "<small><font color='#990000'>" . $i . "</font></small> "; } else { $navigation .= "<a href='?page=album&boek=" . $originalPath . "&vanafFoto=" . $pageNR . "'>" . $i . "</a> "; } } // end for if((isset($_GET['vanafFoto'])) AND (intval($_GET['vanafFoto']>=0)) AND (intval($_GET['vanafFoto'] < $countFotos))){ $begin = intval($_GET['vanafFoto']); if(($begin + $aantalFotos) <= $countFotos){ $eind = ($begin + $aantalFotos); } // end if else { $eind = $countFotos; } // end else } // end if else { $begin = 0; $eind = $aantalFotos; } // end else $countFotos = count($fotoArray); // path naar echte foto } // end else echo "<table border='0' cellpadding='0' cellspacing='2'><tr><td ><b>" . $pathspatie . "</b> <small>(" . $count . ")</small> <br><br><center><small>Pictures " . ($begin + 1) . " - " . $eind . "</small></center></td></tr></table>"; if(($begin - $aantalFotos) >= 0){ $navigation = "<a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&vanafFoto=" . ($begin - $aantalFotos) . "'><</a> " . $navigation; } // end if if(($begin + $aantalFotos) < $count){ $navigation .= " <a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&vanafFoto=" . ($begin + $aantalFotos) . "'>></a>"; } // end if echo $navigation . "<br><br>"; $fotonr = 1; for($i=$begin; $i < $eind; $i++){ $thumb = str_replace($path2, $thumbPath, $fotoArray[$i]); echo "<td align='center'><a href='" . $_SERVER['PHP_SELF'] . "?page=album&boek=" . $originalPath . "&fotoID=" . $i . "'><img border='0' src='" . $thumb . "' height='100'><br>"; $fotonr++; if($fotonr == ($clm + 1)){ $fotonr = 1; } // end if } // end for echo "<td align='center' colspan='" . $clm . "'>"; } // end else if } // end if else { echo "Dit fotoalbum bestaat niet"; } // end else ?> </td></tr></table> </body> </html>
albumlist.php
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Foto Album</title>
</head>
<body>Foto's<br>
<table cellspacing="0" border="0" cellpadding="0" width="90%">
<tr><td colspan="2"><hr></td></tr>
<tr>
<td rowspan="2" align="center" width="200"><a href="?page=album&boek=Album1"><img src="" height="100" alt="Album1" border="0"></a></td>
<td valign="top"><font face="Arial" size="2">Album 1<br>
</font><font face="Arial" size="1">Foto's van bijvoorbeeld je schoonmoeder.</font><br>
</td>
</tr>
<tr>
<td valign="bottom"><a href="?page=album&boek=Album1">Foto's bekijken</a></td>
</tr>
<tr><td colspan="2"><hr></td></tr>
<tr>
<td rowspan="2" align="center" width="200"><a href="?page=album&boek=Album1"><img src="" height="100" alt="Album 2" border="0"></a></td>
<td valign="top"><font face="Arial" size="2">Album 2<br>
</font><font face="Arial" size="1">Foto's van bijvoorbeeld je zomervakantie.</font><br>
</td>
</tr>
<tr>
<td valign="bottom"><a href="?page=album&boek=Album1">Foto's bekijken</a></td>
</tr>
<tr><td colspan="2"><hr></td></tr>
</table>
</body>
</html>
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Foto Album</title> </head> <body>Foto's<br> <table cellspacing="0" border="0" cellpadding="0" width="90%"> <tr><td colspan="2"><hr></td></tr> <tr> <td rowspan="2" align="center" width="200"><a href="?page=album&boek=Album1"><img src="" height="100" alt="Album1" border="0"></a></td> <td valign="top"><font face="Arial" size="2">Album 1<br> </font><font face="Arial" size="1">Foto's van bijvoorbeeld je schoonmoeder.</font><br> </td> </tr> <tr> <td valign="bottom"><a href="?page=album&boek=Album1">Foto's bekijken</a></td> </tr> <tr><td colspan="2"><hr></td></tr> <tr> <td rowspan="2" align="center" width="200"><a href="?page=album&boek=Album1"><img src="" height="100" alt="Album 2" border="0"></a></td> <td valign="top"><font face="Arial" size="2">Album 2<br> </font><font face="Arial" size="1">Foto's van bijvoorbeeld je zomervakantie.</font><br> </td> </tr> <tr> <td valign="bottom"><a href="?page=album&boek=Album1">Foto's bekijken</a></td> </tr> <tr><td colspan="2"><hr></td></tr> </table> </body> </html>
|