#!/bin/env perl # $Id: dss,v 1.3 1998/08/14 13:55:43 bpirenne Exp $ #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #.IDENTIFICATION dss #.LANGUAGE Perl script # #.PURPOSE WWW Digital Sky Survey Interface # #.AUTHOR Bo Frese Rasmussen [ST-ECF] # #.VERSION 1.0 Mar-14-1995 Creation # Jun-14-1995 added MIME output headers and GIF # format [mnaumann] # Oct-05-1995 fixed error check for ra/dec, use # length($in{ra}) instead of ! $in{ra} # to allow ra=0 or dec=0 # Oct-10-1995 call $DSS with all fields even if # no input from the form is available # $DSS $FILEID hh mm ss ądd mm ss x y # [mnaumann] # Nov-21-1995 o added method=GET to allow for # /dss/dss?ra=1&dec=2&mime-type=... # o now sending Content-length # for FITS [mn] # Jul-24-1996 changed some paths to make it # run under the new server # (archive.eso.org) [mn] #.VERSION 1.1 Aug-01-1996 Supports both DSS-1 and DSS-2 [BP, ECF] # Sep-18-1998 added some ASU compliance by # supporting '-c.eq', '-c.ra', '-c.dec', # '-c.obj', '-c.bm','-source', '-mime' # new mime-type image/x-fits [MD, ECF] # Sep-28-1998 in case of object name ignore equinox # [AW] #.VERSION 1.2 Mar-20-1999 New version for acd. This is now the # the *only* script, it sets all env. # variables and calls getimage. # MAY-18-1999 minor change to support blanks between # DEC sign and value and more than one # blank between hh mm ss/dd mm ss values # NOV-11-1999 support for hh mm.m and DD MM.M format # DEC-02-1999 DSS2 blue plate support #------------------------------------------------------------------------------ #use CADC; use File::Path; umask ("2"); $WEBMASTER = 'webmaster\@eso.org'; $FILEID = "dss$$"; # no slash allowed #$ENV{'PATH'}= "$ENV{'PATH'}:/usr/server/arc/bin:/usr/server/bin:/usr/server/X11/bin:/usr/server/gnu/bin"; $ENV{'PATH'}= "$ENV{'PATH'}:/usr/server/bin"; # CG. Default PORT=80 if ($ENV{'SERVER_PORT'} ne '8080') { $HOME_WWW = "/catsrv"; $debug=1; $DSS_PROG= "/catsrv/catalogs/cat-server/bin/dss"; $CONFIG_DIR=$HOME_WWW."/conf"; } else { $HOME_WWW = "/home/web/archive"; $debug=0; $DSS_PROG= "/home/web/archive/docs/dss/bin/getimage_new.exe"; $CONFIG_DIR=$HOME_WWW."/conf"; } #print "\nHOME_WWW= $HOME_WWW \n\n"; #print $ENV{'SERVER_PORT'}; #print "\nPORT= $PORT \n\n"; #print "\nsimbad.conf at $CONFIG_DIR \n\n"; # CG do "$CONFIG_DIR/simbad.conf" || die "\nCannot find simbad.conf\n\n"; $LUT = "$HOME_WWW/docs/dss/lut/real.ppm"; # LUT for GIF output $TMPDIR = "/tmp/.www/dss"; if (! -d $TMPDIR) { mkpath ($TMPDIR, 0, 0775) || die "\nCannot create $TMPDIR\n"; } chdir ("$TMPDIR") || die "\nCannot chdir $TMPDIR\n"; # Temp. dir to put retreived images #unshift(@INC, "/usr/server/arc/perl5/site_perl"); # Perl library (for "cgi-lib.pl") #unshift(@INC, "/usr/lib/perl5/site_perl"); # Perl library (for "cgi-lib.pl") unshift(@INC, "/catsrv/perl5/site_perl"); # Perl library (for "cgi-lib.pl") $debugfile = "/tmp/.www/DSS_new.log"; $bodyBgcolor = "#ffffff"; $cellBgcolor = "#eeeeee"; $cellThBgcolor = "#000000"; $cellThFncolor = "#ffffff"; #------------------------------------------------------- # Prepare STDOUT and STDERR #------------------------------------------------------- open(STDERR,">&STDOUT") || die "Can't dup stdout: $!\n"; select(STDERR); $| = 1; # Make unbuffered. select(STDOUT); $| = 1; # Make unbuffered. #------------------------------------------------------- # Include perl libraries #------------------------------------------------------- require "cgi-lib.pl"; require "eso_util.pl"; require "bsimbad.pl"; #------------------------------ # Parse info from Web Client #------------------------------ ($void , $mode) = split('/', $ENV{'PATH_INFO'}); $DSS = ($ENV{'SCRIPT_NAME'}) ? $ENV{'SCRIPT_NAME'} : "/dss/dss"; #------------------------------------------------------- # Debug stuff.... #------------------------------------------------------- if ($debug) { if ($mode ne "dss.fits") { open(DEBUG,">> $debugfile"); printf DEBUG "*** Web DSS ".`date`." ***\n\n"; } else { open(DEBUG,">> $debugfile"); } select(DEBUG); $| = 1; # Make unbuffered. select(STDOUT); # foreach $env (sort keys(%ENV)) { # printf DEBUG "$env = $ENV{$env}\n"; # } } #------------------------------------------------------- # Main. #------------------------------------------------------- if ($mode eq 'gif') { &dssgif; exit 1; } elsif ($ENV{'REQUEST_METHOD'} eq 'GET' && $ENV{'QUERY_STRING'}) { &get_image; } elsif ($mode ne 'image') { &print_form; } else { &get_image; } exit 1; #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #.PURPOSE Print query form. # #.REMARKS # #.RETURNS #------------------------------------------------------------------------------ sub print_form { local($warning) = ""; print "Content-type: text/html\n\n"; &PrintTop; print <<"END_HTML";

Description

The Online Digitized Sky Surveys (DSS1 & 2) server at the ESO/ST-ECF Archive provides access to the CD-ROM set produced by the Space Telescope Science Institute through its Guide Star Survey group. See the copyright notices. Other versions of DSS are available from the STSci - DSS form and the CADC - DSS form.

The entire DSS1 data is stored on magnetic disks. DSS2 is stored on DVD-ROM in a juke box. Retrieval time takes about less than 5 seconds for a DSS1 field and less than 20 seconds for a random DSS2 field in the juke box. Please read also the description of the ESO/ST-ECF DSS application.

A client to access the DSS-1 and DSS-2 at ESO directly from your computer (without Web browser) is available for Solaris, SunOS, HPUX and Linux i*86 at ftp.eso.org/archive/pub/dss/dss.tar.gz. The client (read the INSTALL and the README files) can also be used in batch mode.


News & Updates

Tuesday July 9, 2002: jukebox maintenance, no DSS2

DSS2-red: now 67 DVDs on-line (98% of the sky)
DSS2-blue: now 34 DVDs on-line (45% of the sky)
DSS2-infrared: now 70 DVDs on-line (99% of the sky)

Send comments to <catalog\@eso.org>.

Query Form

Please enter a position in the R.A. and Dec. fields (J2000) OR an astronomical object name in the Object Name field. You can select an image size up to 1600 square arcminutes (2.5 Kbytes/square arcminute).

Coordinates: R.A. : (hh mm ss) Dec. : (ądd mm ss)
Coordinate System: J2000 B1950
Object Name: (will be resolved by Simbad. )
Image Size: X (arcminutes) Y (arcminutes)
Survey
Output format:
Information on DSS output formats and MIME types is available.
 
 
END_HTML &PrintFooter; } # #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #.PURPOSE Get the image. #------------------------------------------------------------------------------ sub get_image { local($errmsg) = ""; local($simerr) = ""; &ReadParse; #------------------------------- # Validate form input. #------------------------------- # To stay backward compatible while being ASU compliant support # old AND new options. if (length($in{'-source'})) { $in{'Sky-Survey'} = $in{'-source'} }; if (length($in{'-c.eq'})) { $in{'equinox'} = $in{'-c.eq'} }; if (length($in{'-c.ra'})) { $in{'ra'} = $in{'-c.ra'} }; if (length($in{'-c.dec'})) { $in{'dec'} = $in{'-c.dec'} }; if (length($in{'-c.obj'})) { $in{'name'} = $in{'-c.obj'} }; if (length($in{'-c.bm'})) { if (index($in{'-c.bm'}, '/') == -1) { $in{'x'} = $in{'-c.bm'}; $in{'y'} = $in{'x'}; } else { ($in{'x'}, $in{'y'}) = split('/', $in{'-c.bm'}, 2); } } if (length($in{'-mime'})) { $in{'mime-type'} = $in{'-mime'} }; if ($in{'x'} eq '' || $in{'y'} eq '') { $errmsg .= "

ERROR: X and Y sizes havbe to be specified !\n"; } if ($in{'x'} * $in{'y'} > 1600){ $errmsg .= "

ERROR: Image size too large! (40x40 maximum allowed)\n"; } print DEBUG "$in{'dec'}"; if ((! length($in{'ra'}) || ! length ($in{'dec'})) && ! $in{'name'}) { $errmsg .= "

ERROR: Pippo: $len Either an object name -or-\n R.A. and Dec. must be specified !\n"; } # Simbad returns only J2000 coordinates --> radio button should be ignored if (!$in{'name'} && $in{'equinox'} eq 'B1950') { $equinox = '-b'; } else { $equinox = '-j'; } if (! $errmsg) { #------------------------------- # SIMBAD ? #------------------------------- if ($in{'name'}) { $simconn = simbad_connect($SimbadHost, $SimbadPort, $SimbadUser, $SimbadPswd); ($in{'ra'}, $in{'dec'}, $simerr) = simbad($in{'name'}); simbad_disconnect($simconn); printf DEBUG "Coord from SIMBAD: $in{'ra'} -- $in{'dec'}\n"; printf DEBUG "Error from SIMBAD: $simerr\n"; } if ($simerr) { $errmsg .= $simerr; &print_error($errmsg); return; } # free access to the whole sky as of Feb 1st, 1996 if ($SOUTH_ONLY && int($in{'dec'}) > 6) { $errmsg .= "

Sorry, access to the northern part of the sky is restricted.\n"; if ($in{'name'}) { $errmsg .= "

SIMBAD coord.: $in{'ra'}, $in{'dec'}\n"; } &print_error($errmsg); return; } #------------------------------- # Get Image #------------------------------- $ENV{'HOME'} = "$TMPDIR" unless $ENV{'HOME'}; $output = ($debug) ? ">> $debugfile 2>&1" : "> /dev/null 2>&1"; #------------------------------- # Select Sky Survey #------------------------------- $survey=$in{'Sky-Survey'}; if ($survey eq "DSS2") {$survey = "DSS2-red";} if ($survey eq "DSS1") { # CG It reads here: $ENV{'DSS_DIR'}="/catsrv/dss1"; #$ENV{'DSS_LOG'}= "http://acd:8080/cgi-bin/dsslog"; #$ENV{'DSS_MNT'}="cd"; #CG: If uncommented errors. #$ENV{'DSS_DMNT'}=""; #$ENV{'DSS_DEV'}=""; #$ENV{'DSS_HOST'}="psdlin3.hq.eso.org"; #$ENV{'DSS_PORT'}=""; #$ENV{'DSS_CLIENT'}="dss-2.5d"; $ENV{'DSS_MTPT'}="/catsrv/dss1" ; $ENV{'DSS_HDRS'}="$ENV{'DSS_DIR'}/headers"; $ENV{'DSS_EXTN'}="hhh"; $ENV{'DSS_PLTL'}="locomp20.lis"; $ENV{'DSS_LBPF'}="USA_AURA_STSI_DSS1"; $DSS_PROG = "/catsrv/catalogs/cat-server/bin/dss +jukebox vol_path.lis"; } elsif ($survey eq "DSS2-red") { $ENV{'DSS_DIR'}="/catsrv/dss2"; #$ENV{'DSS_LOG'}= "http://archive.eso.org:8080/cgi-bin/dsslog"; #$ENV{'DSS_MNT'}="cd"; #$ENV{'DSS_MTPT'}="/dss2dvd/"; #$ENV{'DSS_DMNT'}=""; #$ENV{'DSS_DEV'}=""; #$ENV{'DSS_HOST'}="acd.hq.eso.org"; #$ENV{'DSS_PORT'}="8080"; #$ENV{'DSS_CLIENT'}="dss-2.52dr"; $ENV{'DSS_HDRS'}="$ENV{'DSS_DIR'}/DSSHeaders"; $ENV{'DSS_EXTN'}="dsh"; $ENV{'DSS_PLTL'}="dss2.v30.lis"; $ENV{'DSS_LBPF'}="usa_aura_stsi_xdss"; $DSS_PROG = "/catsrv/catalogs/cat-server/bin/getimage +jukebox vol_path.lis"; } elsif ($survey eq "DSS2-blue") { $ENV{'DSS_DIR'}="/home/web/archive/conf/dss"; $ENV{'DSS_LOG'}= "http://archive.eso.org:8080/cgi-bin/dsslog"; $ENV{'DSS_MNT'}="cd"; $ENV{'DSS_MTPT'}="/dss2dvd/"; $ENV{'DSS_DMNT'}=""; $ENV{'DSS_DEV'}=""; $ENV{'DSS_HOST'}="acd.hq.eso.org"; $ENV{'DSS_PORT'}="8080"; $ENV{'DSS_CLIENT'}="dss-2.52db"; $ENV{'DSS_HDRS'}="$ENV{'DSS_DIR'}/headers"; $ENV{'DSS_EXTN'}="hhh"; $ENV{'DSS_PLTL'}="xdssdvd_b.lis"; $ENV{'DSS_LBPF'}="usa_aura_stsi_xdss"; $DSS_PROG = "/home/web/archive/docs/dss/bin/dss.exe"; } elsif ($survey eq "DSS2-infrared") { $ENV{'DSS_DIR'}="/home/web/archive/conf/dss"; $ENV{'DSS_LOG'}= "http://archive.eso.org:8080/cgi-bin/dsslog"; $ENV{'DSS_MNT'}="cd"; $ENV{'DSS_MTPT'}="/dss2dvd/"; $ENV{'DSS_DMNT'}=""; $ENV{'DSS_DEV'}=""; $ENV{'DSS_HOST'}="acd.hq.eso.org"; $ENV{'DSS_PORT'}="8080"; $ENV{'DSS_CLIENT'}="dss-2.52di"; $ENV{'DSS_HDRS'}="$ENV{'DSS_DIR'}/headers"; $ENV{'DSS_EXTN'}="hhh"; $ENV{'DSS_PLTL'}="xdssdvd_i.lis"; $ENV{'DSS_LBPF'}="usa_aura_stsi_xdss"; $DSS_PROG = "/home/web/archive/docs/dss/bin/dss.exe"; } else { $survey = "DSS1"; $ENV{'DSS_DIR'}="/catsrv/dss1"; #$ENV{'DSS_LOG'}= "http://archive.eso.org:8080/cgi-bin/dsslog"; #$ENV{'DSS_MNT'}="cd"; #$ENV{'DSS_DMNT'}=""; #$ENV{'DSS_DEV'}=""; #$ENV{'DSS_HOST'}="psdlin3.hq.eso.org"; #$ENV{'DSS_PORT'}=""; #$ENV{'DSS_CLIENT'}="dss-2.5d"; $ENV{'DSS_MTPT'}="/catsrv/dss1/" ; $ENV{'DSS_HDRS'}="$ENV{'DSS_DIR'}/headers"; $ENV{'DSS_EXTN'}="hhh"; $ENV{'DSS_PLTL'}="locomp20.lis"; $ENV{'DSS_LBPF'}="USA_AURA_STSI_DSS1"; $DSS_PROG = "/catsrv/catalogs/cat-server/bin/dss +jukebox vol_path.lis"; } if ($debug) { foreach $env (sort keys(%ENV)) { printf DEBUG "$env = $ENV{$env}\n"; } } #printf DEBUG " $DSS_PROG $equinox $output\n"; open(DSS, "| $DSS_PROG $equinox $output") || ($errmsg .= "

ERROR: Cannot start dss - please report this error to $WEBMASTER\n", &print_error($errmsg), return); #------------------------------------- # Prepare file name for output result #------------------------------------- $in{'ra'} =~ s,^\s+,,; ($hh, $mm, $ss) = split (/\s+|:/,$in{'ra'}); if ($hh =~ m/\./){ $hh = $hh/15.; ($h,$m)=split(/\./,$hh); $mm = ($hh - $h) * 60.; $hh = $h; } $mm = length($mm) ? $mm : '00'; if ($mm =~ m/\./){ ($m,$s)=split(/\./,$mm); $ss = ($mm - $m) * 60.; $mm = $m; } $ss = length($ss) ? $ss : '00'; $in{'ra'} = "$hh $mm $ss"; $in{'dec'} =~ s,^\s+,,; $sign = '+'; if ($in{'dec'} =~ /^-/){ $sign = '-';} $in{'dec'} =~ s,^[+-]\s*,,; ($DD, $MM, $SS) = split (/\s+|:/,$in{'dec'}); if ($DD =~ m/\./){ ($D,$M)=split(/\./,$DD); $MM = ($DD - $D) * 60.; $DD = $D; } $DD = $sign.$DD; $MM = length($MM) ? $MM : '00'; if ($MM =~ m/\./){ ($M,$S)=split(/\./,$MM); $SS = ($MM - $M) * 60.; $MM = $M; } $SS = length($SS) ? $SS : '00'; $in{'dec'} = "$DD $MM $SS"; #printf DEBUG " survey is $survey\n"; if ( $survey eq "DSS1") { $fname = "dss.$hh.$mm.$ss$DD.$MM.$SS"; } else { $fname = "dss2.$hh.$mm.$ss$DD.$MM.$SS"; } #---------------------------------------- # Actually execute dss #---------------------------------------- print DEBUG "
$FILEID hh=$hh mm=$mm ss=$ss DD=$DD MM=$MM SS=$SS X=$in{'x'} Y=$in{'y'}\n"; # if ( $survey eq "DSS1") # { # print DSS "$FILEID $in{'ra'} $in{'dec'} $in{'x'} $in{'y'}\n"; # close (DSS); # } elsif ($survey eq "DSS2") { # $ra=$in{'ra'}; # $dec=$in{'dec'}; # $x=$in{'x'}; # $y=$in{'y'}; # $equ=$in{'equinox'}; print DSS "$FILEID $in{'ra'} $in{'dec'} $in{'x'} $in{'y'}\n"; close (DSS); # printf DEBUG "http_get \"http://acd:8080/dss/dss\?ra=$hh:$mm:$ss&dec=$DD:$MM:$SS&x=$x&y=$y&mime-type=download-fits&Sky-Survey=$survey&equinox=$equ\" $FILEID.fits > /dev/null 2>&1"; # system("http_get \"http://acd:8080/dss/dssexe?ra=$hh:$mm:$ss&dec=$DD:$MM:$SS&x=$x&y=$y&mime-type=download-fits&Sky-Survey=$survey&equinox=$equ\" $FILEID.fits > /dev/null 2>&1"); $errmsg = ''; opendir (THIS_DIR, ".") ; ($FILEID, @rest) = grep (/(^$FILEID)(\w\w\w\w|).fits/,readdir (THIS_DIR)); $FILEID =~ s,\.fits,,g; close (THIS_DIR) ; if (-z $FILEID.fits) { unlink $FILEID.fits; } else { open (FILE,$FILEID.fits); if ( !~ /^SIMPLE/) { close (FILE); # unlink ($FILEID.fits); } close (FILE); } # } else { # print DSS "$FILEID $in{'ra'} $in{'dec'} $in{'x'} $in{'y'}\n"; # close (DSS); # } $errmsg = ''; opendir (THIS_DIR, ".") ; # ($FILEID, @rest) = grep (/(^$FILEID)(xx\w\w\w\w|).fits/,readdir (THIS_DIR)); ($FILEID, @rest) = grep (/(^$FILEID)(\w\w\w\w|).fits/,readdir (THIS_DIR)); $FILEID =~ s,\.fits,,g; close (THIS_DIR) ; printf DEBUG `pwd`."$FILEID.fits\n"; if (-r "$FILEID.fits") { if (! $in{'mime-type'}) { $in{'mime-type'} = 'image/gif'; } if ($in{'mime-type'} eq "download-fits") { # DOWNLOAD AS FITS print "Content-type: application/octet-stream\n"; print "Content-Disposition: attachment; filename=\"$fname.fits\"\n"; print "Content-length: ", (-s "$FILEID.fits"),"\n\n"; system("cat $FILEID.fits"); } elsif ($in{'mime-type'} eq "download-gz-fits") { # DOWNLOAD AS GZIPPED-FITS print "Content-type: application/octet-stream\n"; print "Content-Disposition: attachment; filename=\"$fname.fits.gz\"\n\n"; #system("/usr/server/gnu/bin/gzip -c $FILEID.fits"); system("gzip -c $FILEID.fits"); } elsif ($in{'mime-type'} eq "gz-fits") { # TRANSFER AS GZIPPED-FITS #open (TMP,"|/usr/server/gnu/bin/gzip $FILEID.fits"); open (TMP,"| gzip $FILEID.fits"); close (TMP); print "Content-Type: application/x-fits\n"; print "Content-Length: ", (-s "$FILEID.fits.gz"),"\n"; print "Content-Encoding: x-gzip\n\n"; open (TMP,"|/usr/bin/cat $FILEID.fits.gz"); close (TMP); unlink ($FILEID.fits.gz); } elsif ($in{'mime-type'} eq "image/x-gfits") { # TRANSFER AS GZIPPED-FITS FOR SKYCAT #open (TMP,"|/usr/server/gnu/bin/gzip $FILEID.fits"); open (TMP,"| /gzip $FILEID.fits"); close (TMP); print "Content-Type: image/x-gfits\n"; print "Content-Length: ", (-s "$FILEID.fits.gz"),"\n\n"; #open (TMP,"|/usr/bin/cat $FILEID.fits.gz"); open (TMP,"| cat $FILEID.fits.gz"); close (TMP); unlink ($FILEID.fits.gz); } elsif ($in{'mime-type'} eq "download-gif") { # DOWNLOAD AS GIF print "Content-type: application/octet-stream\n"; print "Content-Disposition: attachment; filename=\"$fname.gif\"\n\n"; system("fitstopgm $FILEID.fits|pgmtoppm -map $LUT|pnmgamma 1.2|pnmflip -tb|ppmtogif -interlace 2>/dev/null"); } elsif ($in{'mime-type'} eq "display/gz-fits") { # DISPLAY AS FITS, TRANSMIT GZIPPED print "Content-Type: image/x-fits\n"; print "Content-Encoding: x-gzip\n\n"; system("/usr/server/gnu/bin/gzip -c $FILEID.fits"); } elsif (($in{'mime-type'} eq "application/x-fits") || ($in{'mime-type'} eq "image/x-fits")){ # DISPLAY AS FITS print "Content-type: $in{'mime-type'}\n"; print "Content-length: ", (-s "$FILEID.fits"),"\n\n"; system("cat $FILEID.fits"); } elsif ($in{'mime-type'} eq "image/gif") { # DISPLAY AS GIF unlink ; # remove all dss gif files from tmp open (TMP,"|fitstopgm $FILEID.fits|pgmtoppm -map $LUT|pnmgamma 1.2|pnmflip -tb|ppmtogif -interlace > $FILEID.gif"); close (TMP); print "Content-type: text/html\n"; print "Pragma: no-cache\n\n"; &PrintTop; print "

RA = $hh:$mm:$ss DEC = $DD:$MM:$SS
"; print "BOX = $in{'x'} x $in{'y'} arcmin
"; print "EQUINOX = $in{'equinox'}
"; print ""; print "\"[click
"; &PrintFooter; # unlink("$FILEID.gif"); # don't remove here, because client will load image separately } } elsif ($survey eq "DSS1") { if ($ENV{'HTTP_USER_AGENT'} =~ /Skycat/i) { $errmsg .= "*** Problem retrieving the image"; } else { $errmsg .= "

ERROR: Problem retrieving the image \ - Please go back and check your input.\n

"; } } else { $errmsg .= "

ERROR: This field is probably not yet available in this DSS-2 survey. Please go back and select another one.\n

"; } } if ($errmsg) { &print_error($errmsg); print "$FILEID $in{'ra'} $in{'dec'} $in{'x'} $in{'y'}\n"; print "
hh=$hh mm=$mm ss=$ss DD=$DD MM=$MM SS=$SS
\n\n"; } unlink("$FILEID.fits"); unlink("$FILEID.fits.gz"); } sub print_error { local ($msg) = @_; print "Content-type: text/html\n\n"; &PrintTop; print $msg; &PrintFooter; } sub PrintTop { print <<"END_HTML"; ESO Online Digitized Sky Survey
 [ ESO/ST-ECF Web Site ]

ESO Online Digitized Sky Survey


END_HTML } sub PrintFooter { print <<"END_HTML";

ESO/ST-ECF Archive | ESO | ST-ECF | Help | Search
END_HTML } sub dssgif { local ($file) = @ENV{'QUERY_STRING'}; if (-r $file) { print "Content-type: image/gif\n"; print "Content-length: ".(-s $file)."\n\n"; system ("cat $file"); } else { print "Content-type: text/html\n\n"; print "ERROR: File not found on server..
"; print @ENV{'QUERY_STRING'}; } } __END__