<?
include ("frames_header.php");
include ("connection.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;
	}
?>

<center><h3>All Molecular tool present in the database</h3><br>

<form name="formu" action="moltool-create.php" method="POST" target="blank">
<input type="submit" value="Create a new Molecular Tool">
</form>
</center>
<br><br>

<?

$requete="SELECT \"IS_ADMIN\" from \"AUTHOR\" where \"AUTHOR_ID\"='".$_SESSION["curationauthor"]."'";
$stmt=pg_query($c,$requete);
$row=pg_fetch_array($stmt);
$ONLY_ANNOTATOR="y";
if ($row["IS_ADMIN"]=="n") $ONLY_ANNOTATOR="y";else $ONLY_ANNOTATOR="n";



$requete="SELECT * from \"MOLECULAR_TOOL\" order by \"NAME\"";
$stmt=pg_query($c,$requete);
while ($row=pg_fetch_array($stmt))
{

print "<div style=\"border-top:1px solid black;border-bottom:1px solid black;\">Type: ".$row["TYPE"].", Name: ".$row["NAME"]." <a target=\"blank\"  href=\"moltool-edit.php?id=".$row["MOLECULAR_TOOL_ID"]."\"><img border=\"0\" width=\"25\" src=\"pictures/button-cur-edit.gif\"></a> &nbsp;&nbsp;&nbsp;&nbsp;";


if ($ONLY_ANNOTATOR=="n") print " <a target=\"blank\" href=\"moltool-delete.php?id=".$row["MOLECULAR_TOOL_ID"]."\"><img src=\"pictures/button-cur-delete.gif\" width=\"25\" border=\"\"0></a>";



print "</div><br>";





}







include ("frames_footer.php");

?>