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

<?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>';
	   include ("frames_footer.php");
		return;
	}
?>



<?
$idmutant=$_GET["idmutant"];
$id=$_GET["id"];

//print $idmutant;
print "<center><strong>Summary of the ISH you wish to associate to your control picture</strong></center><br><br>";


$requete="SELECT \"IN_SITU_ID\",\"DEV_STAGE_ID\",\"SPECIES\",\"CHECKED\",\"PRIVATE\" from \"IN_SITU\" where \"IN_SITU_ID\"='$id' and \"WILD_TYPE\"='y'";
$stmt=pg_query($c,$requete);
$row=pg_fetch_array($stmt);

if (pg_num_rows($stmt)!=0)
{
print "<table width=\"99%\" cellpadding=\"0\" cellspacing=\"0\" border=\"1\" bordercolor=\"#333333\">  <tr bgcolor=\"#990000\" bordercolor=\"#990000\" align=\"center\" valign=\"middle\">
<td align=\"center\">IN_SITU_ID</td><td align=\"center\">DEV_STAGE</td><td align=\"center\">SPECIES</td><td align=\"center\">CURATED ?</td><td background=\"pictures/barre-red.jpg\">PUBLIABLE ?</td></tr>
<tr>
<td align=\"center\"><a href=\"insitu.php?id=$id\">$id</a></td>
<td align=\"center\">".$row["DEV_STAGE_ID"]."</td>
<td align=\"center\">".$row["SPECIES"]."</td>";
if ($row["CURATED"]=='y') print "<td align=\"center\"><font color=\"green\">Yes</font></td>"; else print "<td align=\"center\"><font color=\"red\">No</font></td>";
if ($row["PRIVATE"]=='y') print "<td align=\"center\"><font color=\"red\">No</font></td>"; else print "<td align=\"center\"><font color=\"green\">Yes</font></td>";
print "</tr></table>";
?>
<center>
<br><br>
<form name="formu" method="GET" action="linkcontrol3.php">

<input type="hidden" name="id" value="<? print $id; ?>">
<input type="hidden" name="idmutant" value="<? print $idmutant; ?>">
<input type="submit" value="Submit">
</form>
</center>
<?
}
else
{
print "<center><strong>No match</strong></center>";
}


?>
<center>
<br><br>

<br>
</center>


<?
include ("frames_footer.php");
?>