) {
next unless /^(\w\w+)\s*,\s*(\d\d\d\-\d\d\d)\s*[,\-]\s*(\d\d\d\d)\s*\,\s*(.+?)\s*\n/;
my ($state, $exch, $number, $city) = ($1, $2, $3, $4);
if ($city eq uc($city)) {
$city = lc($city);
$city =~ s/\b(\w)/\u$1/g;
}
my $sname = $sname{$state} || $state;
$city =~ s/\s*Zone.+//;
$nums->{$sname} ||= [];
push @{$nums->{$sname}}, [ "$exch-$number", $city ];
}
foreach my $st (keys %$nums) {
$nums->{$st} = [ sort { lc($a->[1]) cmp lc($b->[1]) } @{$nums->{$st}} ];
}
LJ::MemCache::set("phonepost_nums", $nums, 60*5);
}
my $tot = 0;
$tot += scalar(@{$nums->{$_}}) foreach (keys %$nums);
$ret .= "Jump to: " . join(" | ", map {
"$_" } sort { lc($a) cmp lc($b) } keys %$nums);
my $shown = 0;
my $col = 1;
$ret .= "";
$ret .= "Caution:
Some local telephone companies charge for local calls that are outside of your selected calling plan.";
$ret .= "
If you are not sure that an access number is within your calling plan, contact your local telephone company.";
$ret .= "
You are responsible for all charges associated with calling this service.
";
$ret .= " p?>";
$ret .= "";
foreach my $sname (sort { lc($a) cmp lc($b) } keys %$nums) {
$ret .= "\n";
foreach my $rec (@{$nums->{$sname}}) {
my $shownum = $rec->[0];
$shownum =~ s/^(\d{3})[-\s.](\d{3})[-\s.](\d{4})/$1-xxx-xxxx/ unless $quota > 0;
$ret .= "$shownum: $rec->[1] \n";
$shown++;
}
if ($col == 1 && $shown > ($tot / 2)) {
$col++;
$ret .= " | ";
}
}
$ret .= " |
";
$ret .= "" if $quota > 0;
return $ret;
}
_code?>
<=body
page?>