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.224.44.207
<?php
function uniclareGetStudentPracticalTT($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$regno = $aobj_context->mobj_data['regno'];
$cnd = "and ifnull(cd.fpresent,'') = 'P'";
$query = "select concat('[',cd.fdegree,'] - ',de.fdescpn) as fdegree,
cd.fexamno, de.fexamname, de.FEXAMDATE as exam,
cd.fregno, su.fcsubcode, concat(su.fsubname,' - ',su.fssubname) as fsubname,
concat(date_format(pr.fexamdate,'%d/%m/%Y'),' [',dayname(pr.FEXAMDATE),']') as fexamdate,
pr.fexamtime, concat('[',cl.fcollcode,'] - ',cl.fcollname, ', ', cl.ftown) as centrename,
mp.fbatch from canddet cd inner join subject su on cd.fdegree = su.fdegree
and cd.fexamno = su.fexamno and cd.fsubcode = su.fsubcode
inner join degree de on cd.fdegree = de.fdegree and cd.fexamno = de.fexamno
inner join marks_pr mp on cd.fdegree = mp.fdegree and cd.fexamno = mp.fexamno
and cd.fcollcode = mp.fcollcode and cd.fregno = mp.fregno and su.fcsubcode = mp.fsubcode
inner join practical_entry_freeze pr on mp.fdegree = pr.fdegree and mp.fexamno = pr.fexam
and mp.fcollcode = pr.fcollcode and mp.fsubcode = pr.fcsubcode and mp.fbatch = pr.fbatch
inner join college cl on mp.focollcode = cl.fcollcode
where cd.fregno = '{$regno}' and su.fcsubcode = pr.fcsubcode and ifnull(cd.fpassmth,'') = ''
{$cnd} and su.ftheory <> 'T'";
$result = $aobj_context->pobj_db->GetAll($query);
if(count($result) <= 0)
{
$arr['msg'] = 'Practical 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]['fcsubcode'] = $v['fcsubcode'];
$subarr[$i]['fsubname'] = $v['fsubname'];
$subarr[$i]['fexamdate'] = $v['fexamdate'];
$subarr[$i]['fexamtime'] = $v['fexamtime'];
$subarr[$i]['fbatch'] = $v['fbatch'];
$i++;
}
$res['fdegree'] = $result[0]['fdegree'];
$res['exam'] = $result[0]['exam'];
$res['centrename'] = $result[0]['centrename'];
$response['header'] = $res;
$response['subjects'] = $subarr;
$arr['practical'] = $response;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
|