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


<html>
<body bgcolor="#999966" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<title>ANISEED</title>
<br>
<form name="formulaire" method="GET" action="editreference2.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>';
		return;
	}
?>


<?


$id=$_GET["id"];
$pubmedid=$_GET["pubmedid"];
$oldpmid=$pubmedid;


$requete="SELECT \"TITLE\",\"PAPER\",\"AUTHORS\",\"URL\",\"COMMENTS\" from \"REFERENCE\" where \"BIO_ID\"='$id' and \"PUBMED_ID\"='$pubmedid'";

print "<center><strong><em>Edit this reference<em></strong></center>";
print "<br>";

$stmt=pg_query($c,$requete);

if ($row=pg_fetch_array($stmt))
{
print "<center><table>";

print '<tr><td>PubmedID</td><td> <input type="text" name="pubmedid" value="'.$pubmedid.'"></td></tr>';
print '<tr><td>Title</td><td> <input type="text" name="title" value="'.$row["TITLE"].'"></td></tr>';
print '<tr><td>Paper</td><td> <input type="text" name="paper" value="'.$row["PAPER"].'"></td></tr>';
print '<tr><td>Authors</td><td> <input type="text" name="authors" value="'.$row["AUTHORS"].'"></td></tr>';
print '<tr><td>URL</td><td> <input size="50" type="text" name="url" value="'.$row["URL"].'"></td></tr>';
print '<tr><td>Comments</td><td> <input size="100" type="text" name="comments" value="'.$row["COMMENTS"].'"></td></tr>';
print '<input type="hidden" name="id" value="'.$id.'">';print "<br>";
print '<input type="hidden" name="oldpmid" value="'.$oldpmid.'">';
print "</center></table>";


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">';

}
else
{
print "ERROR";
return;
}






?>

</form>

</body>
</html>
	
