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

<html>
<body bgcolor="#999966" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<title>ANISEED CURATOR - Delete Anatomical Part</title>
<br>
 <form action="deletepartanat2.php" method="post" name="form1" target="_self">


<?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;
}


$insituid = $_GET["insituid"];
$cloneid = $_GET["cloneid"];
$anatid = $_GET["anatid"];
$name = $_GET["name"];

print  '<table width="100%" border="0">';

// to get the good value in deletepartanat2.php
print "<input name=\"insituid\" type=\"hidden\" value=\"$insituid\">";
print "<input name=\"cloneid\" type=\"hidden\" value=\"$cloneid\">";
print "<input name=\"anatid\" type=\"hidden\" value=\"$anatid\">";
print "<input name=\"name\" type=\"hidden\" value=\"$name\">";

//Warning message
print '<tr><td><font color="#CC0000"><H1><u>WARNING:</u></H1></font></td></tr>';
print "<tr><td align=\"center\"><strong>Are you sure you want to <font size=\"+2\" color=\"#CC0000\">DELETE</font> expression in this territory ( $name ) for clone : $cloneid <font size=\"+2\">$id</font>?</strong></td></tr>";
	
//buttons	
//print '<tr><td align="center"><center><img src="pictures/button-cur-delete.gif" title="Cancel"  onClick="javascript:self.close();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="pictures/button-cur-validate.gif" title="Ok"  onClick="javascript:self.location.href =\'curator-delete2.php?id='.$id.'\';"></center></td></tr>';
print '<tr><td align="center"><center><img src="pictures/button-cur-delete.gif" title="Cancel"  onClick="javascript:self.close();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input name="submit" type="image" src="pictures/button-cur-validate.gif" onClick="submit" title="Ok">';
	


//echo" insituid : $insituid <br>clone : $cloneid  <BR> anatid : $anatid <BR> name : $name";
/*
pg_query($c,"begin");
$requete= "Delete from \"TARGET\" where \"TARGET_ID\"=(select \"MOL_ID\" from \"MOL_ENTITY\" where \"NAME\"='$cloneid') and \"REGION_ID\"='$anatid' and \"IN_SITU_ID\"='$insituid'";
//print "<tr><td> ( Requete : $requete ) </tr></td>";
pg_query($c,"commit");
*/

?>

</body>
</html>
 