#! /usr/local/bin/perl # # htgrep --- cgi-bin script to query a database of HTML paragraphs # # NB: this script may have to be installed as "htgrep.cgi" # to run as a CGI script. # Copyright (c) 1995 Oscar Nierstrasz # 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 (as the file COPYING in the main directory of # the distribution); if not, write to the Free Software Foundation, # Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # This script and friends can be found at: # # http://www.iam.unibe.ch/~scg/Src/ # # Author: Oscar Nierstrasz (oscar\@iam.unibe.ch) # include dir for htgrep $PERLLIB_INC = "."; unshift(@INC,$PERLLIB_INC); require("myhtgrep.pl"); # Pick up tags from the environment: &htgrep'settags($ENV{'PATH_INFO'}); &htgrep'settags($ENV{'QUERY_STRING'}); $htgrep'tags{'file'} = "web/whitewaterslalom.org/stats/statsdb"; $htgrep'tags{'filter'} = "statsinfo"; $htgrep'tags{'qry'} = "web/whitewaterslalom.org/stats/stats.qry"; $htgrep'tags{'qry_footer'} = "web/whitewaterslalom.org/stats/stats.qry_footer"; $htgrep'tags{'hdr'} = "web/whitewaterslalom.org/stats/stats.hdr"; $htgrep'tags{'hdr_footer'} = "web/whitewaterslalom.org/stats/stats.hdr_footer"; &htgrep'doit; sub htgrep'statsinfo { s/ / /g; s/^/