#!/bin/sh
#-----------------------------------------------------------------------------
# pickhtml: HTML forms based interface to search an AIPS++ email archive
#-----------------------------------------------------------------------------
#   Copyright (C) 1995,1996
#   Associated Universities, Inc. Washington DC, USA.
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#   Correspondence concerning AIPS++ should be addressed as follows:
#          Internet email: casa-feedback@nrao.edu.
#          Postal address: AIPS++ Project Office
#                          National Radio Astronomy Observatory
#                          520 Edgemont Road
#                          Charlottesville, VA 22903-2475 USA
#
#-----------------------------------------------------------------------------
# Usage: pickhtml <folder>
#-----------------------------------------------------------------------------
# pickhtml is a CGI script which generates an HTML form to obtain options for
# the MH 'pick' command to search an AIPS++ email archive folder.
#
# Options:
#   none
#
# Original: 1996/05/21 by Mark Calabretta, ATNF
# $Id$
#-----------------------------------------------------------------------------
# Required CGI preamble.
  echo "Content-type: text/html"
  echo ""

  echo "<HTML>"
  echo "<HEAD>"
  echo "<TITLE>Search AIPS++ $1 email archive</TITLE>"
  echo "</HEAD>"
  echo ""
  echo "<BODY>"
  echo "<H2>Search AIPS++ <I>$1</I> email archive</H2>"
  echo "<HR>"
  echo ""
  echo "<FORM METHOD=POST ACTION=\"http://aips2.nrao.edu/cgi-bin/scanpick?$1\">"
  echo ""
  echo "<P>Please define search parameters for the $1 email archive:</P>"
  echo ""
  echo "<PRE>"
  echo "   search <INPUT NAME="search"    TYPE=text SIZE="48">"
  echo "  subject <INPUT NAME="subject"   TYPE=text SIZE="48">"
  echo "     from <INPUT NAME="from"      TYPE=text SIZE="48">"
  echo "       to <INPUT NAME="to"        TYPE=text SIZE="48">"
  echo "       cc <INPUT NAME="cc"        TYPE=text SIZE="48">"
  echo "   before <INPUT NAME="before"    TYPE=text SIZE="48">"
  echo "    after <INPUT NAME="after"     TYPE=text SIZE="48">"
  echo "component <INPUT NAME="component" TYPE=text SIZE="48">"
  echo "</PRE>"
  echo ""
  echo "<P><INPUT TYPE=submit> <INPUT TYPE=reset></P>"
  echo ""
  echo "<P>Specify dates in the form &quot;30 May 1996 18:43 +1000&quot;,"
  echo "where the time-of-day and timezone may be omitted.</P>"
  echo "<P>grep-type regular expressions are allowed in the search fields.</P>"
  echo "<P>See the manual page for the MH 'pick' command for further" \
       "information.</P>"
  echo ""
  echo "</FORM>"
  echo "</BODY>"
  echo "</HTML>"
