Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 52.15.109.209
<?php
function getNotificationList($aobj_context){
$univcode = $aobj_context->mobj_data["univcode"];
$fdeggrp = $aobj_context->mobj_data["fdeggrp"];
$fcurType = $aobj_context->mobj_data["fcurType"];
$query = "SELECT fpostno,flabel,fdescpn,IFNULL(ffilepath,'') AS ffilepath,
IFNULL(DATE_FORMAT(IF( ifnull(fcreatedate,'')> ifnull(fupdatedate,''),fcreatedate,fupdatedate),'%d/%m/%Y %h:%i:%s'),'') AS fdate
FROM postnotfn
WHERE CURDATE() BETWEEN ffromdate AND ftodate
AND instr(fdeggrp,'{$fdeggrp}') > 0 AND instr(fusertype,'{$fcurType}') > 0
ORDER BY fcreatedate desc";
$result = $aobj_context->pobj_db->GetAll($query);
// var_dump($query);
// var_dump($result);
// die();
if(!$result)
{
$arr['msg']='Something went wrong with Notifications, please try later.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}else if(count($result) == 0){
$arr['msg']='No Notifications as of now.';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}else{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,1,"success");
}
}
?>
|