#!/usr/bin/perl -w
use strict;
use HTML::Template;
use DBI;
##DB CALL##
my (@network_data, @location_data) = get_data();
##Template##
my $template = HTML::Template->new(filename => 'main.tmpl');
$template->param( NETWORK_DATA => \@network_data);
$template->param( LOCATION_DATA => \@location_data);
print "Content-Type: text/html\n\n", $template->output;
####
IP:
##
while (my $ref = $sth->fetchrow_hashref()) {
my %row_data;
$row_data{NET_ID} = $ref->{'id'};
$row_data{NET_VALUE} = $ref->{'value'};
push(@network_data, \%row_data);
}
while (my $ref2 = $sth2->fetchrow_hashref()) {
my %row2_data;
$row2_data{LOC_ID} = $ref2->{'id'};
$row2_data{LOC_VALUE} = $ref2->{'value'};
push(@location_data, \%row2_data);
}