<?php
	include '../../autoload.php';
	
	$tag_id=$_POST['tag_id'];
	if(!isset($_SESSION['language']))
		$_SESSION['language']="FR";
	$language=$_SESSION['language'];
	
	$conn = get_dbconnection();
	// $sql = "select procedure_needed from quaadpoint_tag, link_quaad_tag where quaadpoint_tag.id=link_quaad_tag.id_tag and link_quaad_tag.id_quaadpoint=".$point_id;
	$sql = "select procedure_needed from quaadpoint_tag where quaadpoint_tag.id=".$tag_id;
	
	$answer = "<root>";
	
	$query = pg_query ( $conn, $sql );
	if ( $query )
	{
		if ($row = pg_fetch_row($query))
		{
			$answer.="<procedure type=\"".$row[0]."\"></procedure>";
		}
	}
	
	$answer.="</root>";
	

	header('Content-Type: text/xml');
	echo $answer;
?>