#!/usr/local/bin/perl $| = 1; use Pg; $downloadOK = 1; $solarReport = ""; $mail_prog = '/usr/lib/sendmail' ; $theRootDir = "/home/hfradio/database/swl"; $theLogFile = $theRootDir . "/lookups.log"; $html_header = "Content-type: text/html\n\n"; $gmtTime = `date -u +%H:%M:%S`; chop $gmtTime; $showTime = `date -u +%H%M`; chop $showTime; $gmtDay = `date -u +%Y-%m-%d`; chop $gmtDay; $styleSheet = "/home/hfradio/html/cgi-bin/styles.format"; $theMenu = "/home/hfradio/html/cgi-bin/menu.format"; $theLinks = "shortwave links"; $remoteHost = $ENV{'REMOTE_HOST'}; &GetFormInput; doSolarData(); my ($result, $conn); my ($okToGoOn) = 1; my ($message) = ""; $conn = Pg::connectdb("dbname=swl user=tomas"); if (! PGRES_CONNECTION_OK eq $conn->status) { $okToGoOn = 0; $message = "Error hooking up to the database. Message is"; $message .= $conn->errorMessage . "\n"; print STDERR "No postgresql connection...\n"; print $html_header; print <Database Down for a while... We are working with the database. This page is down for a while. Please try again later. Thank you.