#!/bin/sh

echo Content-type: text/html
echo
if [ $# = 0 ]
then
  echo "<html><HEAD>"
  echo "<TITLE>Vinyl Revival Record Search</TITLE>"
  echo "<ISINDEX>"
  echo "</HEAD>"
  echo "<BODY background="http://www.vinylrevival.com/art/backvinyl.jpg">"
  echo "<pre>"
echo "<h3 align=left>"
echo "Search for Records Above. The search is not case sensitive."
echo "<br>"
echo "Enter part of a record title, an artist or group name in the search field and press return."
echo "Note: full names must be entered last name, first name..." 
echo "the comma plus the space must be included. Example:Brown, James"
echo "<br>"
echo "Suggested Search Terms:"
echo "Artist or Group Name = please see above instructions."
echo "Audiophile = type audiophile, mfsl, half speed, or quiex II"
echo "Christmas"
echo "Colored Wax = type wax"
echo "Promo = type promo, djl, dj, or wlp"
echo "Quadraphonic"
echo "Hit Song Stickers = type sost"
echo "Covers in Shrink Wrap = type osw"
echo "Year = search by release year."
echo "Label = search by record label, Columbia, or Mercury for example."
echo "</h3>"
echo "</pre>"
  echo "</BODY>"
else
  echo "<HEAD>"
  echo "<TITLE>Result of searching for \"$*\".</TITLE>"
  echo "<ISINDEX>"
  echo "</HEAD>"
  echo "<BODY background="http://www.vinylrevival.com/art/backvinyl.jpg"> <base target="body">"
  echo "<a href=http://www.vinylrevival.com/ordering.html> order form</a> 
|
<a href=http://www.vinylrevival.com>home </a>"
  echo "<h4>all discs are M or M- condition unless otherwise specified</h4>"
  echo "<hr><h3><b>Item No./Artist/ Title (label) condition/comment/price</b></h3>"
  echo "<pre>"

#  fgrep -i -h  "$*" /home/webusers/vinylrevival/htdocs/lists/*
fgrep -i -h  "$*" /home/sites/www.vinylrevival.com/web/lists/*
  echo "</pre>"
  echo "</BODY>"
fi

