Gallery PHP File Help needed!


#1

hello all,

I am currently maintaining a site that was completed by someone else. I have some examples to go off of that work, but I can not figure out what I am doing wrong. The code below is in the file gallery.php. I have fairly novice knowledge of programming language. I have named my files after the examples that were there before. For example, my files are now named “n-001-01.jpg” through “n-0017-01.jpg”. When I click on the gallery link, which points to the gallery.php file I can only see my first image and does not give me my navigator buttons to go to the next pic. Let me know if you any more clarification.

[php]

<? list($type, $property, $pic)=split("-", $index); //echo"TYPE=$type, PROPERTY=$property, PIC=$pic

"; if ($property) { $handle=opendir("gallery"); while ($file=readdir($handle)) { echo "nn"; list($file_name)=split(".", $file); list($file_type, $file_prop, $file_pic)=split("-", $file_name); if ($type==$file_type && $property==$file_prop) { if ($file_pic>$max) { $max=$file_pic; } #end if number>max } #end if right type } #end while closedir($handle); } if (!$pic) { $prev=$max; $next=1; } else { $prev=$pic-1; $next=$pic+1; if ($prev<1) { $prev=$max; } if ($next>$max) { $next=1; } if (strlen($prev)==1) { $prev="0".$prev; } if (strlen($next)==1) { $next="0".$next; } } $index_f=$type."-".$property."-".$next; $index_b=$type."-".$property."-".$prev; ?>

[/php]
Thanks!
Admin Edit: Added the PHP code tags for readability


#2

disregard, got it figured out