if (($Top eq 'All') && (!$SearchString)) {
$total = $sth->fetchrow_array ();
$total = "I'm confused" if !defined ($total);
print "\n";
print "
\n";
print "
Query has returned $total number of records.
\n";
print "
Please, narrow down your cryteria or make sure that if";
print " ALL is selected,
";
print "a string is provided in the query field as well!\n";
} else {
while (($t_datein, $t_timein, $t_dateout, $t_timeout,
$t_port, $t_prot, $t_where, $t_from, $t_pkt_out,
$t_pkt_in, $t_byte_in, $t_byte_out, $t_id) = $sth->fetchrow_array ()) {
$skip = $i % 2;
$i++;
$bytes = $t_byte_out + $bytes;
if ($t_where =~ /(adult|sex|oral|porn|xxx)/i) #you get an idea {
print "
\n";
} elsif ($skip eq 0 ) {
print "
\n";
} else {
print "
\n";
}
print " | $i | \n";
print " $t_from | ";
if ($t_where =~ /.*\.[a-z][a-z][a-z]?$/i) {
print "$t_where";
} else {
print "$t_where";
}
print " | \n";
print " $t_datein $t_timein | $t_dateout $t_timeout | \n";
print "$t_byte_out | \n";
}
$bytes = ($bytes / 1024) / 1024;
}
($sth)->finish();
($dbh)->disconnect();