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



$gene=$_POST["gene"];
if (strlen($gene)!=0)
{
$requete="SELECT \"NAME\" from \"GENE\" where \"NAME\"='$gene'";
$stmt=pg_query($c,$requete);
if (pg_num_rows($stmt)==0)
	{
	print "<br><center>Error Trannscript ID not recognized !!</center><br>";
	include ("frames_footer.php");
	return;
	}
}


if (strlen($gene)!=0) print "<br><center><h3>Add a Molecular Tool for $gene</h3></center>";
else print "<br><center><h3>Create a Molecular Tool</h3></center>";

print "<center><div style=\"border:1px solid black;text-align:left;background-color:white;color:black;width:70%;padding:5px;\">";

print "<form name=\"formu\" action=\"moltool-create2.php\" method=\"POST\" target=\"blank\">";

print "<center>Name<br><input style=\"text-align:center;\" type=\"text\" name=\"name\" size=\"60\" ></center><br><br>";


print "Type: ";
print "<select name=\"type\">";
print "<option>Antibody</option>";
print "<option>Chemical inhibitor</option>";
//print "<option>Driver</option>";
print "<option>Overexpression Construct</option>";
print "<option>Morpholino</option>";
print "<option>mRNA</option>";
//print "<option>Pharmacological inhibitor</option>";
//print "<option>Reporter gene</option>";
print "<option>RNAi</option>";
print "<option>Other</option>";
print "</select><br><br>";

print "Supplier : <input type=\"text\" name=\"supplier\"  size=\"40\"><br><br>";


print "Regulation : <select name=\"regulation\"><option>loss of function</option><option>gain of function</option></select><br><br>";

//print "Associated Transcript (JGI, kyoto, Ensembl) : <input type=\"text\" name=\"asso_gene\" size=\"40\"><br><br>";
print "<center>Comments or Short Description<br><input style=\"text-align:center;\" type=\"text\" name=\"comments\" size=\"90\"></center><br><br>";


print "<center>Sequence for Morpholino<br><textarea name=\"seq\" cols=\"60\" rows=\"2\"></textarea></center><br>";


if (strlen($gene)!=0) print "<input type=\"hidden\" name=\"gene\" value=\"$gene\">";
else print "Associated Transcript (JGI; Kyoto, Ensembl) : <input type=\"text\" name=\"gene\" size=\"30\">";

print "<br><br>PubmedID : <input type=\"text\" name=\"pmid\" size=\"20\">";

print "<br><br><center><input type=\"submit\" value=\"Submit\"></center>";


print "</form>";



print "</div></center>";













include ("frames_footer.php");
?>