#!/usr/bin/perl

# First of all, let's load HELM configuration
use Env;
my $HELM_LIB_DIR = $ENV{"HELM_LIB_DIR"};
# this should be the only fixed constant
my $DEFAULT_HELM_LIB_DIR = "/projects/helm/on-line/local/lib/helm";
if (defined ($HELM_LIB_DIR)) {
   $HELM_LIB_PATH = $HELM_LIB_DIR."/configuration.pl";
} else {
   $HELM_LIB_PATH = $DEFAULT_HELM_LIB_DIR."/configuration.pl";
}

# next require defines: $helm_dir, $html_link, $dtd_dir, $uris_dbm
require $HELM_LIB_PATH;

use CGI;

$cgi = new CGI($ENV{"REQUEST_URL"});
$uri = $cgi->param('uri');

print <<EOT;
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Control panel</title>
<script language="JavaScript" src="http://phd.cs.unibo.it/helm/library3/control.js">
</script>
</head>
<body bgcolor="#ffffff" text="#000000">
<table width="100%">
<tr>
 <td width="50%">
  <font size="+3" face="Helvetica,Arial,sans-serif"><b>Index of $uri</b></font>
  <hr noshade align="left" width="80%">
 </td>
</tr>
</table>
</body>
</html>
EOT
