$value) { if($header=="PAAYASMILKAPPV1") { $httpHeader=$value; } } if($httpHeader!="MakeInGtracAppV1") { die(); }*/ if($_GET) { $masterObj = new master(); $data = array(); if(empty($_GET['token'])) { $arr=array ( 'status' => 0, 'message' => "Feilds are Empty. Kindly Check.", ); array_push($data,$arr); } else { $groupid = addslashes($_GET['token']); $showAll = isset($_GET['showAll']) ? addslashes($_GET['showAll']) : null; if($groupid=="54470" || $groupid=="59278" || $groupid=="50225" ) { $groupid = 6364; } if($_GET['showAll']==null) { $getalrts = $masterObj->getAlertsforpopups($groupid); } else { $getalrts = $masterObj->getAlertsforpopupsall($groupid); } function utf8ize($mixed) { if (is_array($mixed)) { foreach ($mixed as $key => $value) { $mixed[$key] = utf8ize($value); } } else if (is_string($mixed)) { return mb_convert_encoding($mixed, 'UTF-8', 'UTF-8'); } return $mixed; } //print_r($getalrts);die; if(count($getalrts)>0) { //echo "
";
$getalrts = utf8ize($getalrts);
echo json_encode($getalrts, JSON_UNESCAPED_UNICODE);
die;
/*echo json_encode($getalrts);
echo json_last_error_msg();
die;*/
}
else
{
$arr=array (
'status' => 404,
'message' => "No Alerts Found.",
);
array_push($data,$arr);
}
}
echo json_encode($data);
}
?>