#!/usr/bin/perl use Msql; unless ($dbh = Msql->Connect("", "itvs")) { die; } $query = "SELECT region, citystate, eventdate, postdate, title, organization, description, contact, address, phone, fax, email from hbg order by region, eventdate"; unless ($dat = $dbh->Query($query)) { die; } print "Content-type: text/html\n\n\n"; print "Event Listings\n"; print "\n\n\n"; print "

Event Listings

\n\n
\n"; $anything = "N"; while (($region, $citystate, $eventdate, $postdate, $title, $organization, $description, $contact, $address, $phone, $fax, $email) = fetchrow$dat) { $citystate = &fixapos($citystate); $title = &fixapos($title); $organization = &fixapos($organization); $description = &fixapos($description); $contact = &fixapos($contact); $address = &fixapos($address); $phone = &fixapos($address); $fax = &fixapos($fax); $email = &fixapos($email); $anything = "Y"; if ($postdate ne "0") { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($postdate); $mon++; $postdate = sprintf("%s/%s/%s", $mon, $mday, $year); } else { $postdate = " - "; } if ($eventdate == 0) { ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($deadline); $mon++; $eventdate = sprintf("%s/%s/%s", $mon, $mday, $year); } else { $eventdate = "N/A"; } print "\n"; print "\n
\n\n"; print "$region
\n$citystate

\n"; print "Posted: $postdate
\n"; print "Event Date: $eventdate
\n"; print "

\n"; print "$title
\n$organization

\n"; print "$description

\n"; print "Contact: $contact
\n"; print "$address
\n"; print "Phone: $phone
\n"; print "Fax: $fax
\n"; print "E-mail: $email
\n"; print "

\n\n


\n"; } if ($anything eq "N") { print "There are no entries currently.


\n"; } print "Back to previous page.
\n"; print "webmaster\@itvs.org\n"; print "\n\n"; exit; sub fixapos { local ($it) = $_[0]; $it =~ tr/\xA7/\'/; return ($it); }