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.138.178.162
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/ack_report.php |
<?php
function getDegreeGroup($aobj_context)
{
$query = "SELECT DISTINCT(fdeggrp) AS internal_code,fdeggrp AS VALUE FROM degree
WHERE ifnull(fdeggrp,'') <> ''";
$results = $aobj_context->mobj_db->GetAll($query);
$arr['deggrp']=$results;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function getDegreeNames($aobj_context)
{
$deg = $aobj_context->mobj_data["degtype"];
//var_dump($deg );
$query1="SELECT DISTINCT(fdegree) AS internal_code,CONCAT(fdegree,' - ',fdescpn) AS VALUE FROM degree where fdeggrp='{$deg}' ";
//var_dump($query1);
$results1=$aobj_context->mobj_db->GetAll($query1);
$arr['degree']=$results1;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function getResDegreeName($aobj_context)
{
session_start();
$collcode=$_SESSION['collcode'];
// var_dump($collcode);
// die();
$query1="SELECT DISTINCT d.fdegree AS internal_code,CONCAT(d.fdegree,' - ',d.fdescpn) AS VALUE FROM degree d
inner join res_fee r on d.fdegree = r.fdegree
where r.fcollcode = '{$collcode}'";
$results1=$aobj_context->mobj_db->GetAll($query1);
$arr['degree']=$results1;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
function getDegreeResExamName($aobj_context)
{
session_start();
$collcode=$_SESSION['collcode'];
$degree = $aobj_context->mobj_data["degree"];
$type = $aobj_context->mobj_data["type"];
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 d.fexamno AS internal_code,CONCAT(d.fexamno,' - ',d.fexamname) AS VALUE
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 internal_code, dg.fexamdate AS VALUE 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}";
// var_dump($query1);die();
$results2=$aobj_context->mobj_db->GetAll($query1);
$query1=" SELECT DISTINCT ifnull(fsection,'')as fsection FROM student WHERE fcollcode='{$collcode}' AND fdegree='{$degree}' AND TRIM(fsection)<>''";
$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");
}
function getExamNo($aobj_context)
{
$deg = $aobj_context->mobj_data["degtype"];
$degree = $aobj_context->mobj_data["degreename"];
$query2="SELECT fexamno AS internal_code,CONCAT(fexamno,' - ',fexamname) AS VALUE FROM degree
WHERE fdeggrp='{$deg}' and fdegree='{$degree}'";
//var_dump($query2);
$results2=$aobj_context->mobj_db->GetAll($query2);
$arr['exam']=$results2;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
?>
|