<?php 

session_start();

require_once("../../../vendor/autoload.php");

header("Access-Control-Allow-Origin: *");

$config = new \App\Models\Config;
$arr    = $_POST;

$var = $config->deletarDesc($arr);

		if($_POST['tab'] == 'uni_usuarios'){
				$ci = curl_init();

				curl_setopt( $ci, CURLOPT_URL, "https://conect.agenciadp.com.br/response_api_integra.php" ); 
				curl_setopt( $ci, CURLOPT_POST, true);
				curl_setopt( $ci, CURLOPT_POSTFIELDS, array(
					'cod' => 'DELUSER',
					'id' => $_POST['id'],
				));
				curl_setopt( $ci, CURLOPT_HEADER, false );
				curl_setopt( $ci, CURLOPT_RETURNTRANSFER, 1 );

				$result = curl_exec( $ci );
					
				$_retorno = json_decode( $result, true );
		}

echo json_encode($var);