#!/usr/bin/perl # require "BWcgilib.pl"; require "define.pl"; $datadir = join("/", $root, "data"); $taps = join("/", $datadir, "taps.txt"); $cols = 2; open(LIST, $taps); @list = ; close(LIST); &show_html("taps.html"); sub search_results{ local($i) = 0; print "\n"; foreach $s (sort @list) { chop $s; ($name, $rank, $units, $state, $date) = split(/\t/, $s); $name = &noquotes($name); next if(($name eq "Name") or (&trim($name) eq "")); $state = &noquotes($state); $units = &noquotes($units); $rank = &noquotes($rank); $date = &noquotes($date); $state = &ucase($state); print "\n" if ($i % $cols == 0); print "\n" if($i % $cols != 0); $i++; } while ($i % $cols != 0) { print "\n"; $i++; } print "\n"; print "
\n"; print "$name
\n"; print "Rank: $rank
\n" if(&trim($rank) ne ""); print "Units: $units
\n" if(&trim($units) ne ""); print "State: $state
\n" if(&trim($state) ne ""); print "Passed: $date\n" if(&trim($date) ne ""); print "

 
\n"; }