commands :

"; print "?help : display this dialog
"; print "?img [regex] : (attempt to) display files matching [regex] as thumbnails
"; print "?grep [regex] : show only files matching [regex]
"; print "?[number] : launch slideshow, displaying numbered picture
"; print "
admin commands :

"; print "x/?get [url] : gank resource to identically named local file
"; print "x/?mv [oldfile],[newfile] : rename [oldfile] to [newfile]
"; print "
accesskeys (keyboard shortcuts) :

"; print "on the home page : begin slideshow s , display this dialog /
"; print "during slideshow : previous: [, next: ], home: h
"; print "on this page : home: h
"; print "accesskeys are usually called with ALT-[key] on windows, or CTRL-[key] on mac
"; print "specifics can depend on your browser, seek additional information in case of failure
"; die; } // slideshow with accesskeys if (preg_match("/^([0-9]+)$/", $o, $regs)) { $j = $regs[1]; $i = $j - 1; $k = $j + 1; $count = count($filelist); print "
"; if ($i > 0) { print "back "; } if (ereg("\.jpg|\.gif|\.png", $filelist[$i])) { print ""; } else { print "$filelist[$i] : not an image"; } if ($j < $count) { print " forward"; } print "
$filelist[$i] : $j of $count
home
"; die; } // show image thumbnails by regex if (preg_match("/^img%20(.+)/", $o, $regs)) { foreach($filelist as $file) { $ffile = str_replace(" ", "%20", $file); if (ereg($regs[1], $file)) { if (ereg("\.jpg|\.gif|\.png", $file)) { print "$file


"; } else { print "$file : not an image
"; } } } die; } // show only files that match regex if (preg_match("/^grep%20(.+)/", $o, $regs)) { foreach($filelist as $file) { $ffile = str_replace(" ", "%20", $file); if (ereg($regs[1], $file)) { if ($file{0} == $alph) { print "$file
"; } else { $alph = $file{0}; print "
$alph
$file
"; } } } die; } // output to display print "slideshow
"; foreach($filelist as $file) { $ffile = str_replace(" ", "%20", $file); if ($file{0} == $alph) { print "$file
"; } else { $alph = $file{0}; print "
$alph
$file
"; } } ?>