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