#!/oracle/app/oracle/product/7.3.3/bin/oraperl

##### set Oracle's variables #####
$ENV{'ORACLE_HOME'}='/oracle/app/oracle/product/7.3.3';
$ENV{'ORACLE_SID'}='rabbit';
$orauser="vod";
$orapass="vod";

#### set web server address ####
$WSA = "http://clarissa.npac.syr.edu/vod";
$PROJDIR="/project/K136/VOD";




($clipid,$dummy) =  split(/\&/,$ENV{'QUERY_STRING'});


print "Content-type: TEXT/HTML\n\n";

print <<"EndOfHTML";
<head>
</head>
<body bgcolor="moccasin">
EndOfHTML

$lda = &ora_login ('', $orauser,  $orapass);

$csr = &ora_open ($lda,"select TITLE, FNAIL, DATEINSERT 
                  from CLIPTABLE where CLIPID=$clipid ");
($title, $fnail, $date) = &ora_fetch($csr);
&ora_close($csr);

print "<center><img align=center src=\"$fnail\"></center>\n";
print "<h2>Annotations for the clip \"$title\" :</h2><P><HR>\n";
$csr = &ora_open
       ($lda,"select FRAME, DURATION, DATA from ANNOTATIONS 
              where CLIPID=$clipid order by frame");

while ( ($frame, $dur, $data) = &ora_fetch($csr) ) {
	print "<br> <B>$data</B>";
}

&ora_close($csr);

print <<"EndOfHTML";
<HR>
<ADDRESS>Please report problems to NPAC VoD Group<br>
          Marek Podgorny <A Href="mailto:marek@npac.syr.edu">
          &lt;marek@npac.syr.edu&gt;</A><BR>
          Last Modified on Tue Aug 20 23:11:16 EDT 1996
</address>
<A HREF="vnsqueryform">Specify Another Search</A> / 
<A HREF="vnsquery">Playback page</A>
</B></BODY></HTML>
EndOfHTML
