#!/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="tango";
$orapass="tango";

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



print ("Content-type: TEXT/HTML\n\n");
print <<"EndOfHTML"; 
<HTML>
<TITLE>Video News Database - Select an Archive </TITLE>
<BODY bgcolor="gold">
<H1>Select an Archive</H1>
<HR>
<FONT Size="4"> 
Select an archive from the CURRENT ARCHIVE LIST.<BR>
<FONT Size="3"> 
<FORM ACTION="$WSA/cgi-bin/selectcolldisp" METHOD="POST">
<SELECT NAME="archiveid" SIZE="10">
EndOfHTML
##### oracle login #####
$lda = &ora_login('', $orauser, $orapass);

$csr = &ora_open($lda, 
       " select distinct archiveid, aname, adesc from archivetable 
         order by aname");

while ( ($archid, $aname, $adesc ) = &ora_fetch($csr))
{
    print ("<OPTION VALUE=\"$archid\"> $aname : $adesc  \n");

}

&ora_close($csr);
##### oracle logoff ##### 

print <<"EndOfHTML"; 
</SELECT><P>
<INPUT TYPE="Submit" VALUE="SELECT">
<INPUT TYPE="Reset" VALUE="RESET">
</FORM>
<HR>
</BODY>
</HTML>
EndOfHTML

