#!/usr/bin/perl

require "../config.cgi";

print "Content-type: text/html\n\n";
print "<html><head><title>$clear_title</title></head>";
print "<BODY BGCOLOR=$popup_bgcolor link = $link_color vlink = $vlink_color alink = $vlink_color>";

($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$date = "$hour:$min:$sec..$mon:$mday:$year";
$newfile = "archive/$date.html";
$header = "$records_dir/header";
$footer = "$records_dir/footer";

open(ARCHIVE,"|cat $header $records_file $footer > $newfile");
print ARCHIVE $records_file;
close(ARCHIVE);

open (RECORDS, ">$records_file") || die "can't open $records_file\n";
print RECORDS "";
close (RECORDS);

print "<font color=$vlink_color size=5>$records_cleared</font><p>";
print "<font size=3>$archived_as 
<a href=\"$base_records_url/$newfile\">
\"$records_dir/$newfile\"
</a>
.</font>";

print "</body></html>";
