<?php
	require_once '../../autoload.php';

	$result = array (
			"status"	=> 'KO',
			"results"	=> -1
	);
	
	$pdo = getPDO ();
		
	if ( $pdo )
	{
		$mod_id 	= -1;
		
		if ( isset($_POST['mod_id']) )		$mod_id 	= $_POST['mod_id'];

		$s0 = null;

		$sql .="update modality set removed = true  where mod_id = :mod_id;";
				
		$s0 = $pdo->prepare ( $sql );

		$s0->bindParam ( ':mod_id', 	$mod_id 	);
		
		if ( $s0->execute () == true )
		{
			$result['status'] = 'OK';
			$result['results'] = $room_id;
		}
	}
	
	header('Content-type: application/json');
	
	echo json_encode ( $result );
?>