<?php
	require_once '../../autoload.php';
	
	$id		 	= -1;
		
	if ( isset ( $_REQUEST['id'] ) 		)	$id		 	= $_REQUEST['id'];
	
	$conn = get_dbconnection();
	
	$response = -1;
	
	if ( $conn )
	{
		$sql = "";
		
		if ( $id != -1 )
			$sql = 'update examwarning set removed = true where id = '.$id.';commit;';
		
		$result = pg_query ( $conn, $sql );
		
		if ( $result )
		{
			if ( $row = pg_fetch_row($result) )
			{
				$response = $row [0];
			}
		}
	}
	
	header ('Content-type: text/xml' );
	
	echo $response;
?>