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.133.113.24
<?php
function getOldQpDegree($aobj_context){
$collcode = $_SESSION['collcode'];
$query = "select ifnull(c.fdegree, '')as fdegree, concat(ifnull(d.fdescpn, ''), ' ','[',ifnull(c.fdegree, ''),']')as fdescpn
from candsum c inner join degree d on
d.fdegree= c.fdegree where c.fcollcode = '{$collcode}' group by fdegree";
$res = $aobj_context->mobj_db->GetAll($query);
if($res){
echo $aobj_context->mobj_output->ToJSONEnvelope($res, 0, "success");
} else {
$arr['msg'] = 'No degree details found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
return $rdata;
}
}
function getOldQpSem($aobj_context){
$degree = $aobj_context->mobj_data["degree"];
$query = "select distinct ifnull(fprogcode, '')as fprogcode from degree where fdegree = '{$degree}'
and ifnull(fprogcode,'') <> ''";
$res = $aobj_context->mobj_db->GetRow($query);
$fprogcode = $res['fprogcode'];
if($fprogcode == "" || $fprogcode == NULL){
$cond = " and d.fdegree = '{$degree}'";
}else{
$cond = "and d.fprogcode = '{$fprogcode}'";
}
$exam_query = "select distinct ifnull(d.fexamno, '')as fexamno,
concat(ifnull(d.fexamname, ''), ' ','[',ifnull(d.fexamno, ''),']')as fexamname
from qparc a inner join subject s on a.fqpcode = s.fqpcode
inner join degree d on s.fdegree = d.fdegree and s.fexamno = d.fexamno
where s.ftheory = 'T' {$cond} order by d.fexamno";
$exam_result = $aobj_context->mobj_db->GetAll($exam_query);
if($exam_result){
echo $aobj_context->mobj_output->ToJSONEnvelope($exam_result, 0, "success");
} else {
$arr['msg'] = 'No sem details found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
return $rdata;
}
}
function getOldQpYear($aobj_context){
$degree = $aobj_context->mobj_data["degree"];
$sem = $aobj_context->mobj_data["sem"];
$query = "select distinct fprogcode from degree where fdegree = '{$degree}'
and ifnull(fprogcode,'') <> ''";
$res = $aobj_context->mobj_db->GetRow($query);
$fprogcode = $res['fprogcode'];
if($fprogcode == "" || $fprogcode == NULL){
$cond = " and d.fdegree = '{$degree}'";
}else{
$cond = "and d.fprogcode = '{$fprogcode}'";
}
$query = "select distinct ifnull(a.fexamdate, '')as fexamdate from qparc a inner join subject s on a.fqpcode = s.fqpcode
inner join degree d on s.fdegree = d.fdegree and s.fexamno = d.fexamno
where s.ftheory = 'T' {$cond} and s.fexamno = '{$sem}'";
$examdate_result = $aobj_context->mobj_db->GetAll($query);
if($examdate_result){
echo $aobj_context->mobj_output->ToJSONEnvelope($examdate_result, 0, "success");
} else {
$arr['msg'] = 'No degree details found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
return $rdata;
}
}
function getOldQuestionPapers($aobj_context){
$degree = $aobj_context->mobj_data["degree"];
$sem = $aobj_context->mobj_data["sem"];
$year = $aobj_context->mobj_data["year"];
$query = "select distinct fprogcode from degree where fdegree = '{$degree}'
and ifnull(fprogcode,'') <> ''";
$res = $aobj_context->mobj_db->GetRow($query);
$fprogcode = $res['fprogcode'];
if($fprogcode == "" || $fprogcode == NULL){
$cond = " and d.fdegree = '{$degree}'";
}else{
$cond = "and d.fprogcode = '{$fprogcode}'";
}
$query = "select distinct concat(s.fsubname, ' - ', s.fqpcode)as fsubname,q.fexamdate,concat('https://university-question-paper.s3.ap-south-1.amazonaws.com/',q.ffilename) as ffilename, d.fdegree, d.fexamname from subject s
inner join degree d on d.fdegree=s.fdegree and d.fexamno = s.fexamno
inner join qparc q on q.fqpcode=s.fqpcode
where s.fexamno='{$sem}' {$cond} and q.fexamdate='{$year}'";
$examdate_result = $aobj_context->mobj_db->GetAll($query);
if($examdate_result){
echo $aobj_context->mobj_output->ToJSONEnvelope($examdate_result, 0, "success");
} else {
$arr['msg'] = 'No degree details found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "failure");
return $rdata;
}
}
?>
|