#!/usr/local/bin/perl -w
use CGI qw(:standard);

print header();
print '<body bgcolor="#66FFFF">';
print '<font color="#660066">';
print start_html("Orders"), h1("Orders");

open(def_file,"</z/p/l/plee1274/jws/cgi-bin/oid.def") || print "die<p>";
@lines = <def_file>;
@colnames = split(":",$lines[0]);
close(def_file);

open(FILE, "</z/p/l/plee1274/jws/cgi-bin/oid.dat");

@lines = <FILE>;

close(FILE);


print "<TABLE BORDER>";

print "<TR>";
$i=0;
while ($colnames[${i}]) {
 
 my ($slen) = $collens[${i}];
print '<TH>';
print "$colnames[${i}]";
print '</TH>';
# printf("%-${slen}s",$colnames[${i}]);
#  printf("%-${collens[${i}]}s",$colnames[${i}]);
  $i += 1;
}
print "</TR>";


print "<TR>";
$i=0;
while ($colnames[${i}]) {
 
 my ($slen) = $collens[${i}];
print '<TD>';
#print "$collens[${i}]";
print '</TD>';
# printf("%-${slen}s",$colnames[${i}]);
#  printf("%-${collens[${i}]}s",$colnames[${i}]);
  $i += 1;
}
print "</TR>";

foreach (@lines) {
 print '<TR>';

 @values = split(":",$_);
 foreach (@values) {
  print '<TD>';
  print "$_";
  print '</TD>';
 }
 print '</TR>';
}
print "</TABLE>";

print '<A HREF="http://grex.org:10000">Home</A>';


