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.218.250.241
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/CIEpendingList.php |
<?php
function degreeReportcie($aobj_context){
session_start();
$collcode=$_SESSION['collcode'];
$query="SELECT DISTINCT d.FDEGREE, d.FDESCPN FROM degree d
INNER JOIN student r ON d.fdegree = r.fdegree
where r.fcollcode = '{$collcode}'
group by d.fdegree
order by d.FDEGREE";
$result=$aobj_context->mobj_db->GetAll($query);
$qry="SELECT DISTINCT fsubname from subdet where fcollcode='{$collcode}' order by fsubcode";
$result1 = $aobj_context->mobj_db->GetAll($qry);
$querysem="SELECT DISTINCT fexamno, IFNULL(fexamname, '') AS fexamname
FROM degree
WHERE fexamno IS NOT NULL
AND fexamname <> ''
ORDER BY fexamno";
$result2=$aobj_context->mobj_db->GetAll($querysem);
$combinedResult = array(
"result" => $result,
"result1" => $result1,
"result2" => $result2,
);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($combinedResult,0,"success");
}
else{
$data['msg'] = 'Failed to load';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
function degreeSemReportcie($aobj_context){
$degree = $aobj_context->mobj_data["degree"];
if($degree=='All'){
$degreed="fdegree BETWEEN '0' AND 'Z'";
}else{
$degreed="fdegree='{$degree}'";
}
$query="SELECT DISTINCT fexamno, IFNULL(fexamname, '') AS fexamname
FROM degree
WHERE $degreed AND fexamno IS NOT NULL
AND fexamname <> ''
ORDER BY fexamno";
$results=$aobj_context->mobj_db->GetAll($query);
if($results)
echo $aobj_context->mobj_output->ToJSONEnvelope($results, 0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($result,-1,"Failure");
return;
}
function geteventlistcie($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$semester = $aobj_context->mobj_data["semesterr"];
$collcode=$_SESSION['collcode'];
if($degree=='All'){
$degreed="fdegree BETWEEN '0' AND 'Z'";
}else{
$degreed="fdegree='{$degree}'";
}
$qry="select distinct fsubname from subdet where $degreed and
fexamno='{$semester}' and fcollcode='{$collcode}'";
$result = $aobj_context->mobj_db->GetAll($qry);
if($result)
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
else
echo $aobj_context->mobj_output->ToJSONEnvelope($result,-1,"Failure");
return;
}
function loaddeggrprms($aobj_context) {
$collcode = $_SESSION['collcode'];
$query = "SELECT DISTINCT fdeggrp,fdescpn FROM deggrp ";
$result = $aobj_context->mobj_db->GetAll($query);
if ($result) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
} else {
$arr['msg'] = "Data not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
function loadSessionOnDeggrp($aobj_context){
$collcode = $_SESSION['collcode'];
$deggrp=$aobj_context->mobj_data['deggrp'];
$query="SELECT DISTINCT s.fsession AS id,CONCAT(r.FDESCPN,' (',s.fsession,')') AS VALUE
FROM subject s INNER JOIN reason r ON s.fsession = r.FREASONCD
INNER JOIN colldeg cd ON s.fdegree = cd.fdegree
INNER JOIN degree d ON cd.fdegree = d.fdegree
WHERE cd.fcollcode = '{$collcode}' AND d.fdeggrp='{$deggrp}'
ORDER BY s.fsession";
$result = $aobj_context->mobj_db->GetAll($query);
if ($result) {
echo $aobj_context->mobj_output->ToJSONEnvelope($result, 0, "success");
}
else {
$arr['msg'] = "Data not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
function loaddeggrprmsNew($aobj_context) {
$collcode = $_SESSION['collcode'];
$query = "SELECT DISTINCT dg.fdeggrp,dg.fdescpn FROM deggrp dg
INNER JOIN degree d on dg.fdeggrp = d.fdeggrp and d.fexamno = 'a'
INNER JOIN candsum c on d.fdegree = c.fdegree
WHERE c.fcollcode = '{$collcode}'
GROUP BY dg.fdeggrp";
$result = $aobj_context->mobj_db->GetAll($query);
$query = "SELECT distinct d.fexamdate, d.fyear,d.fexamtype
FROM degexam d INNER JOIN candsum c
ON d.fdegree = c.fdegree and d.fyear = c.fyear
and d.fexamtype = c.fexamtype
WHERE c.fcollcode = '{$collcode}'
GROUP BY d.fyear,d.fexamtype";
$result1 = $aobj_context->mobj_db->GetAll($query);
if ($result) {
$data['deggp'] = $result;
$data['exmmonth'] = $result1;
echo $aobj_context->mobj_output->ToJSONEnvelope($data, 0, "success");
} else {
$arr['msg'] = "Data not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
function getRoomExamMomth($aobj_context) {
$collcode = $_SESSION['collcode'];
$query = "SELECT DISTINCT dg.fdeggrp,dg.fdescpn FROM deggrp dg
INNER JOIN degree d on dg.fdeggrp = d.fdeggrp and d.fexamno = 'a'
INNER JOIN candsum c on d.fdegree = c.fdegree
WHERE c.fcollcode = '{$collcode}'
GROUP BY dg.fdeggrp";
$result = $aobj_context->mobj_db->GetAll($query);
$query = "SELECT distinct d.fexamdate, d.fyear,d.fexamtype
FROM degexam d INNER JOIN candsum c
ON d.fdegree = c.fdegree and d.fyear = c.fyear
and d.fexamtype = c.fexamtype
WHERE c.fcollcode = '{$collcode}'
GROUP BY d.fyear,d.fexamtype";
$result1 = $aobj_context->mobj_db->GetAll($query);
if ($result) {
$data['deggp'] = $result;
$data['exmmonth'] = $result1;
echo $aobj_context->mobj_output->ToJSONEnvelope($data, 0, "success");
} else {
$arr['msg'] = "Data not found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr, -1, "error");
return;
}
}
?>
|