<?php
	include '../../autoload.php';
	
	$id=$_POST['id'];
	if(!isset($_SESSION['language']))
		$_SESSION['language']="FR";
	$language=$_SESSION['language'];
	
	$conn = get_dbconnection();
	$sql = "select document_scope from quaadpoint_tag group by document_scope order by document_scope";
	
	$answer = "<documentscopeslist>";
	
	$query = pg_query ( $conn, $sql );
	if ( $query )
	{
		while ($row = pg_fetch_row($query))
		{
			$answer.="<documentscope name=\"".$row[0]."\" ></documentscope>";
		}
	}
	
	$answer.="</documentscopeslist>";
	
	header('Content-Type: text/xml');
	echo $answer;
?>