#!/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 a server to the Video News Database</TITLE>
</head>
<BODY>
<H1>Add a server to Video News DataBase</H1>
<HR><BR>
<FORM ACTION="$WSA/cgi-bin/addserver" METHOD="POST">
<FONT Size="4"> Current servers (Name : IP address : Platform) <BR>
<FONT Size="3">
<OL>
EndOfHTML

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

$csr = 
&ora_open($lda, " select  distinct serverid, sname, ipaddress, platform 
from servertable ");
while ( ($serverid, $servername, $ipaddress, $platform) = &ora_fetch($csr))
{
	print ("<LI>$servername : $ipaddress : $platform <BR>\n");
}

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

print <<"EndOfHTML"; 
</OL>
<FONT Size="4">New Server <BR> <FONT Size="3">
<CENTER><TABLE  BORDER="3" WIDTH="60%">
<TR><TD> Server Name </TD><TD> 
<INPUT TYPE="text" NAME="sname" SIZE="32"></TD></TR><BR>
<TR><TD> Server IP Address </TD><TD>
<INPUT NAME="ipaddress" SIZE="15" MAXLENGTH="15"></TD></TR><BR>
<TR><TD> Platform </TD><TD>
<INPUT NAME="platform" SIZE="32" MAXLENGTH="32"></TD></TR>
</TABLE></CENTER>
<P>
<INPUT TYPE="Submit" VALUE="ADD SERVER">
<INPUT TYPE="Reset" VALUE="RESET">
</FORM>
<HR>
</BODY>
</HTML>
EndOfHTML




