<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Max-Age: 1000');
header('Access-Control-Allow-Headers: Content-Type');
require_once('../lib/dbclass.php');




$message = 'false';
$dataqty = findQuery('SELECT sum(Received) Received  FROM  tbl_transaction where donation=1 and tbl_transaction.Received>0');
$units   = 0;

if ($dataqty[0]['Received'] > 0) {
    $units   = $dataqty[0]['Received'];
    $message = 'true';
}

$data2[] = [



'Count' => $units,

];





echo json_encode(['Status' => $message, 'data' => $data2]);

return;

?>

