
<?php
	
/*
edit-author.php

AUTHOR: Daniel Sobral
12/01/2007

*/
	
	include ("connection.php");
	include ("frames_header.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>";
		include ("frames_footer.php"); 
		return;
	}
		
	echo '<br/><br/><center><strong>Change author</strong><br/><br/>';
	echo '<form name="form1" method="POST" action="edit-author-result.php">';
	print '<input type="hidden" name="id" value="'.$_GET["id"].'"/>';
 	echo'<select name="author">';

	$requete="select \"AUTHOR_ID\",\"NAME\" from \"AUTHOR\" ORDER BY \"NAME\"";
	$stmt=pg_query($c,$requete);
	while ($row=pg_fetch_array($stmt))
	{
		echo '<option value="'.$row["AUTHOR_ID"].'"> '.$row["NAME"].'</option>';
	}
	echo '</select><br/><br/>';
	echo '<img src="pictures/button-cur-delete.gif" title="Cancel"  onClick="javascript:self.close();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
	echo '<input name="submit" type="image" src="pictures/button-cur-validate.gif" onClick="submit" title="Ok"></form></center>';
	
	include ("frames_footer.php");
	
	?>