<?php

//$file = fopen("log.txt", "w");   /// BORRAR LOG
//fwrite($file, "Error $error". PHP_EOL);
//fclose($file);

$ras=$_GET["ras"];
$zona=$_GET["zona"];

$config = require ('config.php');
$conn = obtener_conexion($ras);
function obtener_conexion($rampa){
	$conn_string = "host=localhost port=5432 dbname=VISUAL_CHECK user=VISUAL_CHECK password=Tresco_29";
	$db = pg_connect($conn_string);
	return $db;
}	

$sql="update zonas set exclusiones= '' where ras='$ras' and zona='$zona'";
$result = pg_query($conn,$sql);
pg_close($conn);
echo 'OK';
?>