#!/usr/bin/perl
#
  do "acqPATHs.pl";
  $dfn = $ENV{"QUERY_STRING"};
  $path = "$DATAPATH/$dfn";
  print "Content-type: text/html; charset=iso-8859-1\n\n";
#
  $htmlbody =<<EOM;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<link rel="stylesheet" type="text/css" href="/AMXS/amxs.css">
<title>AMXS remove2</title>
<script type="text/javascript">
<!--
function SelFnm() {
  parent.Ftop.document.FM.fnm.value = "";
  parent.Fhid.document.FM.fnm.value = "";
  location.replace("/AMXS/forms/blank.html");
}
function cancel() {
  location.replace("/AMXS/forms/blank.html");
}
//-->
</script>
</head>
<body bgcolor="ivory" style="margin: 4px 7px;">
<form name="FM">
<hr>
EOM
  print $htmlbody;
#
  if (unlink($path) == 1) {
    print "File \"$dfn\" was removed successfully. &nbsp;\n";
    print '<input type="button" value="OK" onclick="SelFnm()"><br>', "\n";
  } else {
    print "<font color=\"red\"><b>ERROR:</b></font>\n";
    print " failed to remove file \"$dfn\". &nbsp;\n";
    print '<input type="button" value="cancel" onclick="cancel()"><br>', "\n";
  }
#
  print "</form>\n</body>\n</html>\n";
  exit(0);
