#! /bin/sh
# 190597: Daniel Goetz, DL3NEU
# dpftr

echo "Content-type: text/html"
echo
echo "<HTML><HEAD>"
echo "<TITLE>DPBOX search engine</TITLE>"
echo "</HEAD><BODY>"
echo '<BODY BGCOLOR="#ffffff">'

cat dptop.html

echo "<PRE>"
pattern=$(echo ${QUERY_STRING} | sed -e s,'^pattern=',,)
/tmp/pkgbuild/ham/dpbox/work/.destdir/usr/pkg/bin/dphttp "FTR ${pattern}" | \
  /tmp/pkgbuild/ham/dpbox/work/.destdir/usr/pkg/bin/dpcodeconv | \
  /tmp/pkgbuild/ham/dpbox/work/.destdir/usr/pkg/bin/dpputlinks
echo "</PRE>"

cat dpbottom.html

echo "</BODY></HTML>"
