#!/usr/bin/perl
#Take variables from the fields filled out on the previous web page
require 'miner-lib';
my $dir = "/share/bread/www-data/data/webminer";
&ReadParse;
foreach (keys(%in)) {
$in{$_} =~ s/[^A-Za-z0-9\.\,\_\-\[\]\{\}\*\?\+\\]//g;
}
#Print appropriate header information for HTML or spreadsheet output
if ($in{tabdelimited}) {
print "Content-type: spreadsheet/tab-delimited\n\n";
}
else {
print &PrintHeader;
}
#Decide whether to print second page (where you set thresholds)
#or final output page (with results of the search)
if ($in{makejspage}) {
&MakeJSPage;
}
else {
&DoSearch;
}
#Generate second page, which is a form listing the criteria selected on
#the first page and a field to set the expression threshold (or motif
#to search for, etc.) for each criterion
sub MakeJSPage {
print '\n";
@choices = ("empty", split(/\\0/, $in{chosen}));
$number_of_crits = $#choices;
print "
";
print "