#!/usr/old/bin/perl5.004_01
BEGIN { unshift(@INC, "/cgi/more/idiom/icgdata"); };
BEGIN { unshift(@INC, "/cgi/more/idiom/pacwest6"); };
BEGIN { unshift(@INC, "/cgi/more/idiom"); };
use CGI;
use CGI::Out;
use ICG qw();
use PacBell qw();
use PacWest qw();
my (%bank) = (
'PWBA' => 'A',
'PWNC' => 'B',
'PBBK' => 'C',
'ICGO' => 'D',
'FOCL' => 'E',
);
my (%usage) = (
'PWBA' => '
 | A |
',
'PWNC' => ' | B |
',
'PBBK' => ' | C |
',
'ICGO' => ' | D |
',
'FOCL' => ' | E |
',
);
my $query = new CGI;
out $query->header();
out $query->start_html(
-title => 'Idiom access number check',
-author => 'muir@idiom.com',
-bgcolor => '#404040',
-text => '#f8c020',
'-link' => '#d8d8d8',
-vlink => '#e0d820',
),"\n";
my $areacode = $query->param('areacode');
my $prefix = $query->param('prefix');
my $last4 = $query->param('last4');
$last4 = 'xxxx' unless $last4 =~ /^\d\d\d\d$/;
out "Idiom access number locator
\n";
out "";
out <<'';
We cannot guarantee the accuracy of the results returned here. You
should verify them by calling your local phone company.
Idiom accepts no liability for the accuracy of the information
provided here.
if ($areacode !~ /^\d\d\d$/ || $prefix !~ /^\d\d\d$/) {
if ($areacode ne '' || $prefix ne '') {
out <<"";
Invalid data
You must enter a valid areacode and prefix for your
number to be checked.
}
} else {
out "
\n";
out "| \n";
out "\ttoll-free access numbers for $areacode-$prefix-$last4\n";
my $n = PacWest::lookupcity($areacode, $prefix);
out "[$n]\n" if $n;
out "\t |
\n";
my $td = "td bgcolor=#104030";
my %use;
my %shown;
for $an ((
# ICG::checknum($areacode, $prefix),
# PacBell::checknum($areacode,$prefix),
PacWest::checknum($areacode,$prefix)
)) {
my ($city, $state, $ac, $number, $code, $status) = @$an;
next if $shown{"$ac-$number"}++;
$status = " " unless $status;
out "<$td>$city, $state<$td>($ac) $number\n";
out "\t<$td>$status<$td>$bank{$code}
\n";
$use{$code} = $usage{$code};
}
if (%use) {
out "| Line Usage |
\n";
for my $u (values %use) {
out $u;
}
} else {
out "<$td colspan=5>none found\n";
}
out "
\n";
}
out "\n";
out <<"";
Home
|
POPs
|
Hints & How-tos
out $query->end_html();
1;