#!/usr/local/bin/perl -w
#
# eqloc.cgi
#
# 2000-07-12 gg@vedur.is
#############################
use CGI ':standard';
use strict;

#my $eqdisk = "/eq1";
my $eqid   = $ARGV[0];
#my $file   = "$eqdisk"."$eqid".".evb";
my $file   = "$eqid".".evb";

my $q = new CGI;
 
print $q->header(-type=>'text/html');
 
print $q->start_html( "-title"=>'Skjálftastaðsetning',
                     -author=>'gg@vedur.is',
                     -bgcolor=>"FFFFFF",
                     -charset=>"iso-8859-1");


print $q->h1('Automatic location from the SIL seismic system');

if (-e $file && -r $file) {
    open ( FILE, $file );
    my @fdata=<FILE>;
    close(FILE);
    print pre("@fdata");
#    while (<FILE>) {
#        print pre("$_");
#    }
    
#    close(FILE);
}else{
    print $q->h4('Don't find the location file');
}

print $q->hr;

print $q->a({-href=>'./eqlist.html'},"Back");

print $q->end_html;

close(FILE);
