2023-08-12 04:09:17 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("_errors.php");
|
|
|
|
|
2023-08-16 09:04:01 +05:30
|
|
|
|
|
|
|
|
2023-08-12 04:09:17 +05:30
|
|
|
function ReturnJSONData ($arr) {
|
|
|
|
$data = json_encode($arr);
|
|
|
|
if (!$data) {
|
2023-08-16 09:04:01 +05:30
|
|
|
$data = json_encode(array("error" => $Err_Int_JSONEncode));
|
2023-08-12 04:09:17 +05:30
|
|
|
}
|
|
|
|
header("Content-Type: application/json; charset=utf-8");
|
|
|
|
echo $data;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
function ReturnJSONError ($err, $desc) {
|
|
|
|
ReturnJSONData(array(
|
|
|
|
"error" => $err,
|
|
|
|
"description" => $desc
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|