#!/usr/bin/perl
#
unshift(@INC, '/opt/ACISweb/lib');
require 'webconfig.pm';
&webconfig'getconfig('', \%stype,
	\@sname, \%lname, \%alias, \%droot, \%hostlist, \$poolhosts);

$rpt='/www/data/httpd/reports';
$outfilnam="$rpt/hostnames.sel";
die "can't open $outfilnam: $!\n" unless open(SEL, ">$outfilnam");
print SEL "<select name=server>\n";
foreach $whost (@sname) {
  print SEL "  <option value=$whost>$lname{$whost}\n"
		if ($whost eq 'www') || ($stype{$whost} eq 'virtual');
}
print SEL "</select>\n";
close(SEL);


$outfilnam="$rpt/hostnames.sec";
die "can't open $outfilnam: $!\n" unless open(SEL, ">$outfilnam");
print SEL "<select name=server>\n";
foreach $whost (@sname) {
  print SEL "  <option value=$whost>$lname{$whost}\n"
			if $stype{$whost} eq 'https';
}
print SEL "</select>\n";
close(SEL);
