<?php
	include ("frames_header.php"); 
print "<title>ANISEED CURATOR - Edit Minimal Promoter</title><br>";

	include("connection.php");

	if ( (!isset($_SESSION["login"]))or(!isset($_SESSION["pass"])) ) {
	    print "<strong>you need to <a href=\"login.php\">login</a> as an authorised curator to proceed.</strong>";
	    print '</center></body></html>';
		return;
	} 

	//PROMOTER_ID
	$id = $_GET["id"];
	$prom_id = $_GET["promid"];

	 echo '<form name="formCreateRegReg" action="construct-edit-minprom-result.php" method="post"> 	
		<p>Basal promoter: <select name="MIN_PROMOT_ID" size="1">
			<option value="'.$prom_id.'">Endogenous Promoter</option>';
	 
	//$khoueiry = "SELECT A.\"PROMOTER_ID\", A.\"NAME\" FROM \"PROMOTER\" A ,\"GENE_REGULATION\" B WHERE A.\"PROMOTER_ID\"=B.\"PROMOTER_ID\" AND B.\"TYPE\" LIKE '%Basal Promoter%';";
	$khoueiry = "SELECT \"PROMOTER_ID\", \"NAME\" FROM \"PROMOTER\" WHERE \"TYPE\" LIKE '%Basal Promoter%';";
	$stmt = pg_query($c,$khoueiry);
		
	while($row=pg_fetch_array($stmt)){ 
	  echo '<option value="'.$row["PROMOTER_ID"].'">'.$row["NAME"].'</option>';
	}

	//Make REPORTER GENE A LINK TO A MOL_ID	
	echo '</select></p>	
		<input name="id" type="hidden" value="'.$id.'">
		<input name="promid" type="hidden" value="'.$prom_id.'">
		<p><input name="submit" type="submit" value="Make Changes"></p>
	</form>'; 

	include ("frames_footer.php"); 

?>