#!/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";



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

print <<"EndOfHTML"; 

<HTML>
<head>
<script>
top.main.document.bgColor=top.menu.document.bgColor
</script>
<TITLE>Add an archive to Video News Database</TITLE>
</head>
<BODY>
<H1>Add an archive to the Video News DataBase</H1>
<HR><BR>
<FORM ACTION="$WSA/cgi-bin/addcoll" METHOD="POST">
<FONT Size="4"> Current archives:  (Archive ID : Archive name : 
Archive description)<BR>
<FONT Size="3">
<OL>
EndOfHTML

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

$csr = &ora_open($lda, " select  distinct archiveid, aname, adesc from archivetable ");
while ( ($archiveid, $aname, $adesc) = &ora_fetch($csr))
{
	print ("<LI>$archiveid : $aname : $adesc <BR>\n");
}

##### logoff oracle #####
&ora_logoff($lda);

print <<"EndOfHTML"; 
</OL>
<CENTER><TABLE  BORDER="3" WIDTH="60%">
<Caption><B>New archive:</b></caption>
<TR><TD> Archive name:</TD><TD> 
<INPUT TYPE="text" NAME="aname" SIZE="15"></TD></TR><BR>
<TR><TD> Archive description: </TD><TD>
<INPUT NAME="adesc" SIZE="60"></TD></TR>
</TABLE></CENTER>
<P>
<INPUT TYPE="Submit" VALUE="ADD ARCHIVE">
<INPUT TYPE="Reset" VALUE="RESET">
</FORM>
<HR>
</BODY>
</HTML>
EndOfHTML
