- headline //

- text //

- captions // Settings $twidth = 800; //width of tables $picalign = "left"; //starting column alignment picture on left or right $bgcolor = "white"; $tablecolor = "lightblue"; $text = "black"; $link = "blue"; $alink = "red"; $vlink = "purple"; $headerlink = "../photos_menu.inc"; $footerlink = "../photos_menu.inc"; echo ""; echo ""; echo ""; if (file_exists('title.txt')){ echo "\n"; include('title.txt'); echo "\n"; } echo ""; // read img files into $filenames array $filenames = array(); foreach (new DirectoryIterator('.') as $fileInfo) { $filename = $fileInfo->GetFilename(); if (strtolower(substr($filename,-4))==".jpg" || strtolower(substr($filename,-4))==".png" || strtolower(substr($filename,-4))==".gif"){ $filenames[] = $filename; } } asort($filenames); $top_pic_flag = 0; echo ""; if (file_exists($headerlink)){include $headerlink;} echo "
"; if (file_exists('title.txt') && !file_exists('notes.txt')){ echo "

 
"; include('title.txt'); echo "

\n"; } if (file_exists('notes.txt')){ echo "
 
"; if (file_exists('title.txt')){ echo "

"; include('title.txt'); echo "

\n"; } if (substr(current($filenames),0,4) == "000-"){ $top_pic_flag = 1; $filename = current($filenames); $caption = substr($filename, 4, -4); $caption = preg_replace( "/--([0-9][0-9]|[0-9][0-9][0-9]|[0-9][0-9][0-9][0-9])-/", "&#$1;", $caption); $caption = str_replace("_"," ",$caption); echo "
 
"; echo ""; echo "

$caption

"; echo "

"; } echo "

"; $notes = file_get_contents('notes.txt'); $notes = str_replace(chr(10),'
',$notes); echo $notes; echo "

\n"; } foreach ($filenames as $filename){ if (substr($filename,0,4) <> "000-" || $top_pic_flag <> 1){ $caption = substr($filename, 0, -4); if (substr($caption,3,1) == "-"){$caption = substr($caption,4);} $caption = preg_replace( "/--([0-9][0-9]|[0-9][0-9][0-9]|[0-9][0-9][0-9][0-9])-/", "&#$1;", $caption); $caption = str_replace("_"," ",$caption); echo "
 

$caption

\n"; if ($picalign == "left"){$picalign = "right";}else{$picalign = "left";} } } echo "

"; if (file_exists($footerlink)){include $footerlink;} echo ""; echo ""; ?>