and

[ Select all | Select none] "; } ?>

Foto Gallery!

| Select Directory | Configure | Help |
\n"; } else if ($cmd == s) { /* View source code */ $src = `php -s index.html`; if ($src) { print "
$src
\n"; } else { $src = `cat $SCRIPT_FILENAME`; print "
$src
\n"; } } else if ($cmd == t) { /* View single photo */ print "

$img

"; $txt = eregi_replace(".jpg",".txt",$img); @readfile("$photopath/$dir/$txt"); print "
Back!
\n"; } else if (eregi("^v", $cmd )) { /* Preview Directory Content */ $handle = opendir("$photopath/$dir"); print "
"; form_buttons(); print "

Directory description

"; @readfile("$photopath/$dir/README"); $target = urlencode("$dir/README"); // print "
Add or change description"; print "
"; print "\n"; $count = 0; while ($img = readdir($handle)) { if (ereg("^s_",$img)) { if (($count % $ncol) == 0) { print "\n"; } $bimg = ereg_replace("^s_","",$img); $size = `du -sk $photopath/$dir/$bimg`; $sizes = preg_split("/\s+/",$size); print "\n"; if (( ($count+1) % $ncol) == 0) { print "\n"; } $count++; } } closedir($handle); print "

1:1 2:1 |
$sizes[0] KB
"; print "\n"; print "
"; } else if (eregi("^h", $cmd )) { print "

Help

Web Photo Viewer its a simple tool to organize and visialize your photos.

  1. Put the file index.html in a web accessible directory.
  2. Foreach set of photos you have, create a directory and place the photos there.
  3. Run the script wpv_install_dir.sh inside each dir
        #!/bin/sh
        #  wpv_install_dir
        
        for i in *.jpg; do
    	    echo \"Processing \$i...\";
    	    convert -geometry 92x92 \$i s_\$i
        done
        
  4. If you want, you can add a README file for each directory with a description of photos in that directory
  5. if you want, you can add a file .txt for each photo, witha description of the photo
"; } else if (eregi("^c", $cmd )) { print "

Configuration

still working on it..."; } else if (eregi("^m", $cmd )) { $target = urldecode($target); print "

Modify description for $target


"; } else { /* Default page */ print "This is a web viewer for photos and images. Please, select a directory.\n"; } ?>