
<?
include ("connection.php");
print "<title>ANISEED CURATOR - Change Dev Stage</title><br>";
include ("frames_header.php");

$id=$_GET["id"];
?>

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

<br>
<center><strong>Please choose the new developmental stage</strong></center>
<br>
<center>
<form name="formu" action="changedev3.php" method="POST">
<select name="devstage" size="5">
<?
$requete="select \"SPECIES\" from \"IN_SITU\" where \"IN_SITU_ID\"='$id'";
$stmt=pg_query($c,$requete);
$row=pg_fetch_array($stmt);
$species=$row["SPECIES"];

$query="SELECT \"NAME\", \"DEV_STAGE_ID\" FROM \"DEV_STAGE\" WHERE \"SPECIES\"='$species' ORDER BY \"DEV_PERCENT\"";
$stmt = pg_query($c,$query);

while($row=pg_fetch_array($stmt))
{
print "<option value=\"".$row["DEV_STAGE_ID"]."\">";
print $row["NAME"]."</option>\n";
//$dev .= $row["DEV_STAGE_ID"].":";
}
?>
</select>
<br>
<br>
<br>
<input type="hidden" name="id" value="<? print $id; ?>">
<input type="submit" value="Submit">
</center>
</form>










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