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 : 18.188.46.93
<?php
function uniclareGetStudentProfile($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fregno = $aobj_context->mobj_data['regno'];
$univcode = $aobj_context->mobj_data['univcode'];
$url = "https://university-student-photos.s3.ap-south-1.amazonaws.com/";
$query = "select distinct s.fname, s.ffatname, s.fmotname, s.fdegree, s.fcollcode,
d.fdescpn as degree, d.fexamname, concat(d.fexamdate,' Examination') as fexamdate,
concat(c.fcollname,', ',c.ftown) as college,
c.fcollcode as collcode,
concat('{$url}', '{$univcode}/', s.fphotopath) as fphotopath,
if(ifnull(fcaste,'') = '', 'GM',fcaste) as category,
if(ifnull(fconstype,'') = '', 'Normal Fee', fconstype) as feetype,
ifnull(fexamappblk,0) as examblk
from student s
inner join degree d
on s.fdegree = d.fdegree
inner join college c
on s.fcollcode = c.fcollcode
where s.fregno = '{$fregno}'";
$result = $aobj_context->pobj_db->GetRow($query);
if(count($result) > 0)
{
$arr['studProfile'] = $result;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$arr['msg'] = 'Profile Not found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
|