options: -html php options: -default_index index.php Album: <: print Path('album_name'); :> <: Meta() :> <: if (!(Parent_Albums_Left() == 1)) { _:> <:_ } :> title="Up one folder" />

<: print Path('album_name') :>

\n"; echo "\tWe are sorry for the inconvenience, but this section is protected.\n"; echo "\tPlease enter the passphrase to continue. If you don't have the passphrase,\n"; echo "\tyou can request it from the\n"; echo "\tSite Administrator

\n\n"; echo "\t
\n"; echo "\t\tPassphrase: \n"; echo "\t
\n"; echo "
\n"; exit (0); } } ?>
<: if (isHeader()) { _:>

<:pHeader():>

<: } _:> #c # Are there more albums below this one? <: if (my $dir = First('dirs')) { _:> #c # If there are more then 4 sub albums, print the latest updated <: if ( num('dirs') > 4 ) { _:>

Latest Updated Albums


#c #c # We print the top 4, or Total sub albums - 4, whichever is less #c # <: my $latest_num = num('dirs') - 4; :> <: $latest_num = 4 if $latest_num > 4; :> #c <: my @top_dirs = (undef, undef, undef, undef); :> <: my @dirs_obj = (undef, undef, undef, undef); :> <: my $t_dir = Next($dir); :> <: while ( $t_dir ) { _:> #c # Check the date (mtime) re-order if current sub album is older then one stored #c # <: my $path_name = Path('dir') ."/". Get($t_dir,'name'); :> <: my $stat = ( stat( $path_name ) )[9] ; :> <: for (my $i=0; $i<$latest_num; $i++) { _:> <: if ( $stat >= (stat($top_dirs[$i]))[9] ) { _:> #c # Current sub album is older then $i'th top_dir, re-order arrays #c # <: for (my $j=$latest_num-1; $j>$i; $j--) { _:> <: $top_dirs[$j] = $top_dirs[$j-1]; :> <: $dirs_obj[$j] = $dirs_obj[$j-1]; :> <: } :> #c <: $top_dirs[$i] = $path_name ; :> <: $dirs_obj[$i] = $t_dir; :> <: last; :> #c <: } :> <: } :> <: $t_dir = Next($t_dir); :> <: } :> <: foreach my $dir_obj (@dirs_obj) { _:> #c # Print the oldest sub albums, ordered by date #c # <: next if ! $dir_obj ; :>
<: if (Image($dir_obj,'thumb')) { _:> <: my $img = Image($dir_obj,'thumb'); :> <:= Get($dir_obj,'href','dir').$img."" :> <: } else { _:> <:= Get($dir_obj,'href','dir')."" :> <: } :>
<:= Get($dir_obj,'href','dir').Name($dir_obj) :>
<: } :>
<: } :>

Albums


#c # Loop on all the albums <: while ($dir) { _:>
<: if (Image($dir,'thumb')) { _:> <: my $img = Image($dir,'thumb'); :> <:= Get($dir,'href','dir').$img."" :> <: } else { _:> <:= Get($dir,'href','dir')."" :> <: } :>
<:= Get($dir,'href','dir').Name($dir) :>
<: if (New_Row($dir,4,0)) { _:>
<: } :> #c # End album loop <: $dir = Next($dir); :> <: } :>
#c # End if albums <: } :> <: if (Images()) { _:>

Picures in <: print Path('album_name'); :>

<: my $img=First('pics'); :> #c # Loop on all the images <: while($img) { _:>
<: print Get($img,'href','image'); :> <: print Image($img,'thumb') if Get($img,'thumb'); :>
<: if (New_Row($img,4,0)) { _:>
<: } :> <: $img = Next($img); :> <: } _:> #c # End if images
 
<: } _:>