<?php
	require_once '../../autoload.php';
	
	RightsCheck ("VIEW_EXAMLIST");
	
	$exam_id		 		= -1;
	$examident_id	 		= -1;
		
	
	if ( isset ( $_REQUEST['exam_id'] ) 		)	$exam_id		= $_REQUEST['exam_id'];
	if ( isset ( $_REQUEST['examident_id'] )	)	$examident_id	= $_REQUEST['examident_id'];
				
	$conn = get_dbconnection();
	
	$response = -1;
	
	if ( $conn )
	{
		$sql = '';

		$sql = 'delete from examident_link where exam_id='.$exam_id.' and examident_id='.$examident_id.';';
		
		$result = pg_query ( $conn, $sql );
		
		if ( $result )
		{
			$response = 1;
		}
	}
	
	header ('Content-type: text/xml' );
	
	echo $response;
?>