\n\n" ); } // Is there any descriptive text to go in? It is in .txt if ( file_exists( $FolderName."/".$FileFolder[ 1 ].".txt" ) ) { $DescFile = fopen( $FolderName."/".$FileFolder[ 1 ].".txt", "r" ); if ( $DescFile ) { $buf = fgets ($DescFile, 1000 ); if ( $buf != "" ) printf( "

%s%s

%s", $HeaderFont, $buf, NewLine() ); while( $buf = fgets ($DescFile, 1000 ) ) { printf( "

%s%s

%s", $TextFont, $buf, NewLine() ); } } print( "
" ); } // There may also be individual file descriptions. // Load up an array of these if ( file_exists( $FolderName."/". $CaptionFileName ) ) { $CaptionFile = fopen( $FolderName."/". $CaptionFileName, "r" ); if ( $CaptionFile ) { while ($buf = fgetcsv ($CaptionFile, 1000, ",") ) { $Captions[ $buf[ 0 ] ] = $buf[ 1 ]; } } } // cycle through all the files and build the html table $Count = count( $FileList ); print( "\r\n" ); print( "\r\n" ); for ( $i = 0; $i < $Count; $i++ ) { if ( $i % 3 == 0 ) { print( "\r\n"); } $File = $FileList[ $i ]; $BigFile = substr ($File, 3 ); if ( isset( $Captions ) && $Captions[ $BigFile ] !== NULL ) $Caption = $Captions[ $BigFile ]; else $Caption = $BigFile; // printf( "", // $FolderName, "/", $BigFile, // $FolderName, "/", $File, // $Caption ); printf( "", "showsingleimage.php?FolderName=$FolderName&Index=$BigFile", $FolderName, "/", $File, $Caption ); } print( "\r\n" ); print( "
$TableFont %s$TableFont %s
\r\n" ); // Include any html header data that is required. if ( !readfile( GetFooterName() ) ) { print( "\n\n" ); } } //$folder = "ausreports/19810000hville"; if ( isset( $folder ) ) DisplayImages( $folder ); ?>