Ciao a tutti, ho settato questo script PHP per una galleria fotografica, funziona fino alla visualizzazione degli album ma quando ci clicco non compaiono le foto contenute all'interno... non capisco dove sbaglio..
Codice PHP:
<html>
<head>
<script type="text/javascript" src="../lightbox2.05/js/lightbox.js">
</script>
</head>
<body>
<?php
$page = $_SERVER['PHP_SELF'];
//settings $column = 5;
//directories $base = "carrelli_noleggio";
$thumbs = "thumbs";
// get album $get_album = $_GET['album'];
//if no album selected if (!$get_album) {
echo "[b]Select an album:[/b]
";
//find each album and display as links
$handle = opendir($base);
while (($file = readdir($handle))!==FALSE) {
if (is_dir($base."/".$file) && $file != "." && $file != ".." && $file != $thumbs) {
echo "[url='$page?album=$file']$file[/url]
";
} }
closedir($handle); }
else {
//check if album exist, and additional security checks
if (!is_dir($base."/".$get_album) || strstr($get_album,".") !=NULL || strstr($get_album,"/")!=NULL || strstr($get_album,"\\")!=NULL) {
echo "Album doesn't exist."; }
else { $x = 0;
echo "[b]$get_album[/b]
";
$handle = opendir($base."/".$get_album);
while (($file = readdir($handle)) !== FALSE) {
if ($file != "." && $file != "..") {
echo "<table style='display:inline;'><tr><td><a href='$base/$get_album/$files' ref='lightbox'[img]$base/$thumbs/$file[/img]</a></td></tr></table>";
$x++;
if ($x==$column) {
echo"
";
$x = 0;
} } }
closedir($handle);
echo "
[url='$page']Back to albums[/url]"; } }
?>
</body>
</html>
Questo codicè è incluso all'interno di un div in un altra pagina...