#!/usr/bin/perl
require 'cgi-lib.pl';
require 'cgi-style.pl';
$newloc = "http://www.FreeBSD.org/";
print &html_header("FTP Download");
open (MIRRORS, "ftp.mirrors");
print "
Download $ARGV[0] from one of the following mirror sites:
\n";
$oldplace = "";
while () {
    if (/.*:.*:/ && !/^#/) {
    ($place, $site, $root) = split(':',$_);
	chop $root; $root =~ s/ *$//;
	if ($place ne $oldplace) {
	    if ($oldplace ne "") {
		print "\n";
	    }
	    print "$place\n\n";
	    $oldplace = $place;
	}
	print "- $site\n";
    }
}
close (MIRRORS);
print "
\n";
print &html_footer;