<?php
	$urlbase = $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
	$parts = parse_url($urlbase);
	parse_str($parts['query'], $query);

	// Consulta a API
	$params['token'] = $_SESSION["usuario"]["api_token"];
	if(isset($query["date"])){ $params['date'] = $query['date']; $params['enddate'] = $query['enddate']; }
	$api = api('/listAccountability', $params);
	$api = json_decode($api, 1);
?>