25 lines
389 B
PHP
25 lines
389 B
PHP
<?php
|
|
|
|
require_once "../header.php";
|
|
|
|
$data = Task::getStats();
|
|
|
|
$data["error"] = false;
|
|
$data["message"] = "";
|
|
|
|
pushData();
|
|
|
|
exit();
|
|
|
|
function pushData($errormsg = null) {
|
|
global $data;
|
|
|
|
if ( !is_null($errormsg) ) {
|
|
$data["error"] = true;
|
|
$data["message"] = $errormsg;
|
|
}
|
|
header('Content-Type: application/json');
|
|
echo json_encode($data);
|
|
exit();
|
|
}
|