#!/usr/bin/perl -w push (@INC,"/home/httpd/cgi-bin/"); require ("cgi-lib.pl"); require "header_footer.lib"; &ReadParse(\%input); use DBI(); # Connect to the database. my $dbh = DBI->connect("DBI:mysql:database=htindex;mysql_socket=/var/lib/mysql/mysql.sock", "root", "mobob26", {'RaiseError' => 1}); # we never reach this point if we wanted a redirect print &PrintHeader; #This finds the searched for HT data. if ($input{'isdata'} || $input{'records'} =~ /^0/) { # Now retrieve data from the table. $subject = $dbh->quote($input{'subject'}); $subject =~ s/^\'//; $subject =~ s/\'$//; $division = $dbh->quote($input{'division'}); $division =~ s/^\'//; $division =~ s/\'$//; $headline = $dbh->quote($input{'headline'}); $headline =~ s/^\'//; $headline =~ s/\'$//; if (($input{'theyear'}) || ($input{'themonth'}) || ($input{'theday'})) { $htdate = "LIKE '%$input{'theyear'}%-%$input{'themonth'}%-%$input{'theday'}%'"; } else { $htdate = "BETWEEN '$input{'syear'}-$input{'smonth'}-$input{'sday'}' AND '$input{'eyear'}-$input{'emonth'}-$input{'eday'}'"; } my $sthrows = $dbh->prepare("SELECT * FROM htdata WHERE subject LIKE '%$subject%' AND division LIKE '%$division%' AND headline LIKE '%$headline%' AND (htdate $htdate OR htdate='0000-00-00') ORDER BY htdate, subject, division, headline, page"); $sthrows->execute(); my $refcount = $sthrows->rows; # no search was entered unless (($input{'subject'}) || ($input{'division'}) || ($input{'headline'})) { print "
Subject | $ref->{'subject'} | |||||||||||||||||||||
Subheading | $ref->{'division'} | |||||||||||||||||||||
Date (year-month-day) |
$ref->{'htdate'} | |||||||||||||||||||||
Headline | $ref->{'headline'} | |||||||||||||||||||||
Page | $ref->{'page'} | |||||||||||||||||||||
|
Subject | $ref->{'subject'} | |||||
Subheading | $ref->{'division'} | |||||
Date (year-month-day) |
$ref->{'htdate'} | |||||
Headline | $ref->{'headline'} | |||||
Page | $ref->{'page'} | |||||
|
|
|
Currently, the index includes articles from the Bloomington Herald-Times
and the Herald-Telephone for the years 1985-2005.
Guidelines for requesting photocopies of articles contained in the index:
|