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

<html>
<body bgcolor="#999966" text="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<title>ANISEED</title>
<br>

<?

$ordre=explode(":",$_GET["ordre"]);

$promoter_id=$_GET["id"];

pg_query($c,"begin");
for ($i=0;$i<count($ordre);$i++)
{
$requete="UPDATE \"CONSTRUCTION\" SET \"ORDRE\"='$i' where \"PROMOTER_ID\"='$promoter_id' and \"NAME\"='".$ordre[$i]."'";
pg_query($c,$requete) or die("Error on update");
}
pg_query($c,"commit");

print "<br><br><center><h1>Update construction order done</h1></center><br>";

?>

</body>
</html>
