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 : 3.17.175.191
<?php
function uniclareGetStudentTheoryTT($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$regno = $aobj_context->mobj_data['regno'];
if($univcode == '027x')
{
$cnd = "concat('[', cs.fcntrcode, '] - ', cl.fcollname, ', ' , cl.ftown) as centre";
}else
{
//$cnd = "concat('[', cs.fcntrcode, '] - ', cl.fcollname, ', ' , cl.ftown) as centre";
$cnd = "' - ' as centre";
}
//concat('[', cs.fcntrcode, '] - ', cl.fcollname, ', ' , cl.ftown) as centre
$query = "select cd.fregno, dg.fexamname, cd.fexamno,
concat('[',cd.fdegree,'] - ',dg.fdescpn) as fdegree, cd.fexamtype,
concat(dg.fexamdate, ' Examination') as fexamdate, cd.fyear, su.fqpcode, su.fsubname,
concat(date_format(su.fdoe,'%d/%m/%Y'),' [',dayname(su.fdoe),']') as fdoe,
re.fdescpn,
{$cnd}
from canddet cd inner join subject su on cd.fdegree = su.fdegree
and cd.fexamno = su.fexamno and cd.fsubcode = su.fsubcode and ifnull(su.fqpcode,'') <> ''
inner join degree dg on cd.fdegree = dg.fdegree and cd.fexamno = dg.fexamno
inner join reason re on su.fsession = re.freasoncd
inner join candsum cs on cd.fdegree = cs.fdegree and cd.fcollcode = cs.fcollcode
and cd.fregno = cs.fregno and cs.fyear = dg.fmeyear and cs.fexamtype = dg.fmeexamtyp
inner join college cl on cs.fcntrcode = cl.fcollcode
where cd.fregno = '{$regno}' and ifnull(cd.fpassmth,'') = ''
and ifnull(cd.fpresent,'') = 'P' and su.ftheory = 'T'
order by su.fdoe";
$result = $aobj_context->pobj_db->GetAll($query);
if(count($result) == 0)
{
$arr['msg'] = 'Theory Time Table Details Not Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
$i = 0;
$subarr = array();
foreach($result as $k => $v)
{
$subarr[$i]['fslno'] = "";
$subarr[$i]['fexamname'] = $v['fexamname'];
$subarr[$i]['fqpcode'] = $v['fqpcode'];
$subarr[$i]['fsubname'] = $v['fsubname'];
$subarr[$i]['fdoe'] = $v['fdoe'];
$subarr[$i]['fdescpn'] = $v['fdescpn'];
$i++;
}
$res['fdegree'] = $result[0]['fdegree'];
$res['fexamdate'] = $result[0]['fexamdate'];
$res['centre'] = $result[0]['centre'];
$response['header'] = $res;
$response['subjects'] = $subarr;
$arr['theorytt'] = $response;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
|