SimpleTasks/ajax/task-getstats.php
2023-08-15 11:09:53 -04:00

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();
}