#!/bin/sh album="$(dirname $QUERY_STRING)" name="$(basename $QUERY_STRING)" forsale=0 # pics in this album aren't for sale filelist="$album/.filelist" identify="/usr/local/bin/identify" exif="/tmp/showpic.exif.info.$$" scriptbc="/home/taylor/www/coloradoportraits.com/scriptbc.sh" PATH="$PATH:/bin:/usr/bin:/home/taylor/www/coloradoportraits.com"; export PATH trap "/bin/rm -f $exif" 0 getwidth() { width="$($identify "$1" | cut -d\ -f3 | sed 's/[^0-9]/ /g' | cut -d\ -f1)" echo $width } getsize() { height="$($identify "$1" | cut -d\ -f3 | sed 's/[^0-9]/ /g' | cut -d\ -f2)" width="$($identify "$1" | cut -d\ -f3 | sed 's/[^0-9]/ /g' | cut -d\ -f1)" ### If there's a reduction factor, add these lines: # height="$(expr $height / $reduce)" # width="$(expr $width / $reduce)" echo "height=\"$height\" width=\"$width\"" } nicename() { echo "$1" | sed -e 's/.[Jj][Pp][Gg]//' -e 's/-/ /g' -e 's/IMG_//' -e 's/DSC_//' -e 's/DSCF//' } showexif_popup() { return 0 # on the 'to do' list echo "
" cat $exif echo "
| "
echo " "
# first off, let's figure out where this entry is in the filelist...
match="$(grep -n "^$name$" $filelist | cut -d: -f1 )"
if [ -z "$match" ] ; then
match="$(grep -n "$name$" $filelist | cut -d: -f1 )"
fi
if [ "$match" -eq 1 ] ; then
echo "no previous image"
else
minusone="$(expr $match - 1)"
lastimage="$(sed -n "${minusone}p" < $filelist)"
nicely="$(nicename $lastimage)"
if [ ! -z "$newest" ] ; then
echo "<< $nicely"
else
echo "<< $nicely"
fi
fi
if [ ! -z "$realalbum" ] ; then
echo " | $realalbum | "
else
echo " | $nicealbum | "
fi
matches="$(wc -l < $filelist | sed 's/[^0-9]//g')" # pics in album
if [ "$match" -eq "$matches" ] ; then
echo "no next image"
else
plusone="$(expr $match + 1)"
nextimage="$(sed -n "${plusone}p" < $filelist)"
nicely="$(nicename $nextimage)"
if [ ! -z "$newest" ] ; then
echo "$nicely >>"
else
echo "$nicely >>"
fi
fi
echo " |
| "
# Display the actual image itself:
# useragent="$(echo $HTTP_USER_AGENT | grep "Windows")"
echo " Image $nicename from Album \"$nicealbum\" "
# else
# echo "color:#444'>Image $nicename"
# fi
# The information box
echo ""
if [ -r $album/$name.info ] ; then
cat "$album/$name.info"
fi
# now let's get the EXIF information, which is stuck in the 'comment'
# field, as far as I can tell...
echo " "
echo ""
showexif "$album/$name"
echo " |
| High-quality prints of this photograph are available | ||
|---|---|---|
| Only \$40 USD | Only \$75 USD | Only \$99 USD |
| Photographic prints are made on museum quality Fuji Crystal Archive Lustre paper and are shipped directly to any domestic US address via UPS second day - for free - in a heavy mailing tube. For an additional fee photos can be mailed anywhere in the world, and I'd be happy to mount the photograph prior to shipment: please contact me for details and a quote. | ||