Contents / Photos /

images as $im ) { $im_desc = filename_to_desc($im); printf("\"%s\"\n", $images->directory, rawurlencode($im), $images->directory, rawurlencode($im), $im_desc, $im_desc); } ?>

Last updated on $Date: 2007-09-15 14:49:02 +0100 (Sat, 15 Sep 2007) $ by David Vrabel (dvrabel@cantab.net)
directory = $dir; $this->find_images(); } function find_images() { $jpg_regex = ".jpg$"; $this->images = array(); $dir = dir( $this->directory ); while( $fn = $dir->read() ) { /* Skip images that haven't be renamed yet. */ if( ereg("imgp[[:digit:]]{4}.jpg$", $fn) ) { continue; } if( ereg(".jpg$", $fn) ) { $this->images[] = $fn; } } sort($this->images); } } function dirname_to_desc($fn) { ereg("images/(.+)$", $fn, $regs); return ereg_replace("/", " - ", $regs[1]); } function filename_to_desc($fn) { return ereg_replace("([^/]).jpg$", "\\1", $fn); } ?>