<?php
	//connection
	include("connection.php");
?>


<html>
<body bgcolor="#999966" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<title>ANISEED</title>

<?php
    if ( (!isset($_SESSION["login"]))or(!isset($_SESSION["pass"])) ) {
	    print "<center><strong>you need to <a href=\"login.php\">login</a> as an authorised curator to proceed.</strong>";
	    print '</center></body></html>';
		return;
	}
?>


<?php

	$moname=$_GET["moname"];
	$stop=$_GET["stop"];
	$seq=$_GET["seq"];
	$comments=$_GET["comments"];

    $text = $_POST["text"];
    $text = ereg_replace( "'", "", $text);
	$text = stripslashes($text);
	

if (strlen($moname)>0) print $moname;
		if (strlen($stop)>0) print "$begin-$stop";
		if (strlen($seq)>0) print $seq;
		if (strlen($comments)>0) print $comments;		

//$requete="update 



/* 
	    $requete="update \"".strtoupper($type)."\" set \"".strtoupper($part)."\"= '".$text."' where \"".strtoupper($type)."_ID\"=$id";
	
pg_query($c,"begin");		
		$resultset = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
		$requete = "update \"ENTRY_ORIGIN\" set \"CURATOR_ID\"=".$_SESSION['curationauthor'].", \"CURATION_DATE\"=now() where \"BIO_ID\"=$id";
		$resultset = pg_query($c,$requete);
		
		if($part=="name"){
			$requete = "update \"MOL_ENTITY\" set \"NAME\"='$text' where \"MOL_ID\"=$id";
			$resultset = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
			
			$requete = "update \"TARGET\" set \"NAME\"='$text' where \"TARGET_ID\"=$id";
			$resultset = pg_query($c,$requete) or die("<strong>Error</strong> ".pg_last_error($c));
		}
	
		// Validation de la transaction
		//$committed = OCICommit($connection);
pg_query($c,"commit");
*/
		
			print '<center><H1>Update done</H1><br>';
			print '<input name="Exit" type="button" value="-= Close window =-" onClick="javascript:self.close();"></center>';
		
		



?>

</body>
</html>