#!/usr/bin/perl BEGIN { use vars '$hw_cgi_path'; $hw_cgi_path = '/home/u2/proandpost/productionportal/html/weather'; } ####################### # HAMweather 3 # This script is copyright(c) 1997-2003 by HAMweather, LLC all rights reserved. # It is subject to the license agreement that can be found at the following # URL: http://www.hamweather.net/hw3/license.shtml ####################### # # # Revision: # $Id: hw3.cgi,v 1.54 2005/02/15 03:15:57 wxfyhw Exp $ # BEGIN { if (!-e $hw_cgi_path) {$hw_cgi_path = &get_dir_path;} if (!-d "$hw_cgi_path/hamlib") { print "Content-type: text/html\n\n"; print "The path setting in the 4th line of the this cgi file is incorrect.
\n"; print "Make sure that it is a full file path to the directory containing the HW3 'hamlib' directory.
\n"; print "Some servers may use a different path when the script is executed from the web than from the command line.\n"; print "\n"; exit; } sub get_dir_path { my ($pwd, $dir_path, $cwd, $pt); eval '$home = (getpwuid($< ))[7];'; if (!-e "C:/") { $pwd = `pwd`; chop $pwd; } else { $pt = $ENV{'PATH_TRANSLATED'}; $pt =~ s![\\/][^\\/]+$!!; } if (!eval 'use Cwd;') { eval '$cwd = cwd();'; } else { $cwd = ''; } if ($pt && -e $pt) { $dir_path = $pt; } elsif (!$pwd) {$dir_path = $cwd;} else { $dir_path = $pwd; } return $dir_path; } } use lib $hw_cgi_path .'/hamlib'; use lib '/home/u2/proandpost/productionportal/html/weather/hamlib'; #print "Content-type: text/html\n\nDEVELOPMENT MODE
\n"; #require perl 5.004 minimum require 5.004; # lets load up or needed libraries BEGIN { $SIG{__WARN__} = sub { warn @_ if $_[0] !~ /uninit|isn't numeric/ } } #use warnings; # no warnings 'uninitialized'; #eval { use strict; use HW::hw3main; #set the global variables use vars qw($DEBUG $VERSION $BETA $VERSIONTYPE $REVISION ); $|=1; $VERSION = '3.086'; $BETA = 0.0; $VERSIONTYPE = 'PERL'; $REVISION = '$Id: hw3.cgi,v 1.54 2005/02/15 03:15:57 wxfyhw Exp $'; ######### Configuration Section # eval { hw3_main($hw_cgi_path, $VERSION, $REVISION, $BETA); }; # if ($@) { # print "Content-Type: text/html\n\n"; # print "error: $@\n"; #} hw3_main($hw_cgi_path, undef, $VERSION, $REVISION, $BETA); exit; 1;