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.141.198.113
<?php
function degreeresult($aobj_context){
$collcode = $aobj_context->mobj_data["collcode"];
$query="SELECT DISTINCT IFNULL(d.fdegree,'')AS value, CONCAT(IFNULL(d.fdescpn, ''),
' ', '[',IFNULL(d.fdegree,''),']')AS label FROM degree d
INNER JOIN res_fee r ON d.fdegree = r.fdegree
WHERE r.fcollcode = '{$collcode}'";
$result = $aobj_context->mobj_db->GetAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$arr['msg']='failed to load';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
function degreegrp($aobj_context){
$collcode=$aobj_context->mobj_data["collcode"];
if($collcode == 'LSYS'){
$cond = "";
}else{
$cond = "where fcollcode='{$collcode}'";
}
$query = "SELECT DISTINCT IFNULL(gr.fdeggrp,'') AS value,CONCAT(IFNULL(gr.fdescpn,''),' ' ,'[',IFNULL( gr.fdeggrp,''),']') AS label FROM student st
INNER JOIN degree dg ON st.fdegree = dg.fdegree
INNER JOIN deggrp gr ON dg.fdeggrp = gr.fdeggrp
$cond ORDER BY gr.fdescpn";
$result = $aobj_context->mobj_db->getAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$error_msg = "Degree group details not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($error_msg,-1,"success");
return;
}
}
function examDateNo($aobj_context){
$collcode=$aobj_context->mobj_data["coll"];
$degree=$aobj_context->mobj_data["deg"];
$type=$aobj_context->mobj_data["deggrp"];
if($type === 'deggrp'){
$cond = "INNER JOIN deggrp dg ON d.fdeggrp = dg.fdeggrp";
$grpcond = "and dg.fdeggrp = '{$degree}'";
$examDateCond = "INNER JOIN degree deg ON deg.fdegree = d.fdegree
INNER JOIN deggrp dg ON dg.fdeggrp = deg.fdeggrp";
}else{
$cond = "";
$grpcond = "and r.fdegree = '{$degree}'";
$examDateCond = "";
}
$queryDeg = "select distinct d.fdegree AS internal_code, CONCAT(d.fdegree,' - ',d.fdescpn) AS VALUE from degree d
inner join colldeg c on c.fdegree = d.fdegree
where fdeggrp='{$degree}' and c.fcollcode='{$collcode}'";
$resDeg = $aobj_context->mobj_db->GetAll($queryDeg);
$query1="SELECT DISTINCT IFNULL(d.fexamno,'') AS value,CONCAT(IFNULL(d.fexamname,''),' ','[',IFNULL(d.fexamno,''),']') AS label
FROM degree d
inner join res_fee r on d.fdegree = r.fdegree
and d.fexamno = r.fexamno
{$cond}
where r.fcollcode = '{$collcode}' {$grpcond}";
$results1 = $aobj_context->mobj_db->GetAll($query1);
$query1=" SELECT DISTINCT CONCAT(dg.fyear,'*',dg.fexamtype) AS value, dg.fexamdate AS label FROM deggrp dg
where dg.fdeggrp = '{$degree}'
union
SELECT DISTINCT concat(d.fyear,'*',d.fexamtype) AS internal_code,
d.fexamdate AS VALUE
FROM degexam d
inner join res_fee r on d.fdegree = r.fdegree
and d.fexamno = r.fexamno
and d.fyear = r.fyear and d.fexamtype = r.fexamtype
{$examDateCond}
where r.fcollcode = '{$collcode}'
{$grpcond}";
$results2 = $aobj_context->mobj_db->GetAll($query1);
$query1=" SELECT DISTINCT ifnull(fsection,'')as value FROM student WHERE fcollcode='{$collcode}' AND fdegree='{$degree}'";
$results3 = $aobj_context->mobj_db->GetAll($query1);
$arr['degexam']=$results1;
$arr['degexamdate']=$results2;
$arr['fsection']=$results3;
$arr['degree'] = $resDeg;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
?>
|