#!/bin/bash
#
# This is Bjarni's Incredible Online Midi Player, version 1.1.
# This script is in the Public Domain. Enjoy?
#
# Send heaps of cash to: Bjarni R. Einarsson, http://bre.klaki.net/
#
# This Makes Stuff Secure
SONGNAME=$(perl -e 'my $e = $ENV{"QUERY_STRING"}; $e =~ s/[^A-Za-z0-9\/_-]//; print $e')
cat <<-tac
Content-Type: text/html
Bjarni's Incredible Online Midi Player! $SONGNAME
tac
cat ../html/photos-body.html
if [ -f ".$SONGNAME" ]; then
cat <<-tac
Playing...
$SONGNAME
[ Make it stop!!! ]
tac
else
cat <<-tac
The Incredible Online Midi Player!
This is my Inrecible Online Midi Player, for those of you unfortunate
enough to have a midi-enabled browser. Here you can torture your ears
with these renditions of songs I've found online and bothered to
steal and store here. Enjoy?
$SONGNAME
tac
fi
echo "
Song index:
Links:
"
find . -name link.html -exec cat \{\} \;
cat <<-tac
Powered by Bash
(source code)
tac
cat ../html/photos-tail.html
cat <<-tac