#!/usr/bin/perl -I/usr5/site_univ # Script: javascript.pl use strict; #use Apache(); use CGI; use DBI; use UVD; use UV_AUTH; # global variable defintions go here; if the main body of your script # uses a variable that is also used by a subroutine in this file then # define it here as follows: # # use vars qw/$variable_name/; # use vars qw/$dbh $uvd $uv_auth $q $sth/; use vars qw/$count @ac_type/; use vars qw/$v_product_name $v_service_name $remote_user/; $dbh = undef; $uvd = new UVD; $uv_auth = new UV_AUTH; $q = new CGI; undef $count; undef @ac_type; $remote_user = $ENV{REMOTE_USER}; $remote_user =~ tr/a-z/A-Z/; sub query_info { my ($c0) = qq/ SELECT distinct aircraft_type, series FROM uwa_aircraft_type WHERE NAVTECH = 'Y' ORDER BY aircraft_type/; $sth = $dbh->prepare($c0); $sth->execute(); while (my ($temp, $temp2) = $sth->fetchrow()) { next if length($temp) == 0; $temp =~ s/"/\\'\\'/; $temp2 =~ s/"/\\'\\'/; $temp = $temp . " - " . $temp2; push(@ac_type, "$temp"); } } sub print_data { my ($i); my ($a, $b, $c, $d, $e, $f, $g, $h, $i, $j); $a = $#ac_type / 3; $b = $a + $a; $c = $b + $a; print q/
| Aircraft
Types Supported by UVflightplanner.com |
| If your aircraft is not listed, weather services are still available |