#!/opt/csg/bin/perl # # latestv -- page for latest oven images and temperatures. # # call as a cgi script # # Copyright (C) 1997 by J. M. Hill # Created at Steward Observatory for use by # the Large Binocular Telescope Project, 14JUN97 # $version = "16JUN97"; $picaname = "rlbt/videoa.gif"; $picbname = "rlbt/videob.gif"; $piccname = "rlbt/videoc.gif"; $picdname = "rlbt/videod.gif"; $picename = "rlbt/videoe.gif"; $infoname = "rlbt/temperature"; # strip \'s put in by server (apparently) $ARGV[0] =~ s/\\(.)/$1/g; # introduction print "Content-type: text/html\n\n"; print "Latest Views Inside the Furnace\n"; print "\n"; print "

Large Binocular Telescope 8.4 meter Mirror

\n"; print "

Latest Views Inside the Furnace

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
\n"; print "Camera A
\n"; print "
\n"; print freshness($picaname); print "
\n"; print "Camera B
\n"; print "
\n"; print freshness($picbname); print "
\n"; print "Camera C
\n"; print "
\n"; print freshness($piccname); print "
\n"; print "Camera D
\n"; print "
\n"; print freshness($picdname); print "
\n"; print "Camera E
\n"; print "
\n"; print freshness($picename); print "
\n

\n"; if ( -e $infoname ) { ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($infoname); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($mtime); $datet = $mon+1 . "/" . $mday . "/" . $year ; $timet = $hour . ":" . $min . " MST" ; open(SFILE,$infoname); $line = ; close(SFILE); ($tlid, $tconei, $tconeo ) = split (' ', $line, 80); print "The oven temperature was ", $tlid, " degrees C at ", $timet, " on ", $datet, ".\n

\n"; } print "For the duration of annealing these images will only update a few times per day.

\n"; print "\n


\n"; print "\nThis page was generated automatically by J. M. Hill's \"latestv.cgi\" script, version $version.

\n"; print " To the previous page

\n"; ####################################################################################### sub freshness { # subroutine to get file stats and format them into a string ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat(@_); ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($mtime); $sizea = int($size / 1000) . " kB"; $datea = $mon+1 . "/" . $mday . "/" . $year . "
"; $timea = $hour . ":" . $min . " MST
" ; $freshness = $datea . $timea . $sizea ; }