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

<html>
<body bgcolor="#999966" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<title>ANISEED CURATOR - Add Embryo Manipulation</title><br>
 
<?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

$id=$_GET["id"];
$species=$_GET["species"];
$devid=$_GET["devid"];
$from=$_GET["from"];
$structure=$_GET["region"];



if (strlen($devid)==0)
	{
	print "<center><strong>Error: Select a developmental stage before !</strong></center>";
	return;
	}


$requete="INSERT INTO \"EMBRYO_MANIP\" (\"IN_SITU_ID\",\"STRUCTURE_ID\",\"FROM_ID\") values('$id','$structure','$devid')";
//print $requete;
pg_query($c,"begin");
pg_query($c,$requete);
pg_query($c,"commit");



print '<center><H1>Insert done</H1></center>';
print ' <br><center> To see changes refresh the "IN SITU FULL REPORT" page</center><br>';

print '<br><center><input name="Exit" type="button" value="-= Close window =-" onClick="javascript:self.close();"></center>';
?>

<SCRIPT LANGUAGE="JavaScript"> javascript:opener.location.reload(); self.close(); </script>
