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.216.161.178
<?php
function getMarksListDegree($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode = $aobj_context->mobj_data['collcode'];
$userID = $aobj_context->mobj_data['fuser'];
$db = $aobj_context->mobj_data["univname"];
if($user_type =='S' || $user_type =='A')
$join = "";
if($db == 'nmamit' || $db == 'srun' || $db == 'jsstu' || $db == 'sjbit' || $db == 'rrit')
{
$query = "SELECT DISTINCT IFNULL(d.fdegree,'') AS `key`,IFNULL(d.fdegree,'') AS `value`,
CONCAT(d.fdegree,' - ',d.fdescpn) AS label FROM degree d
INNER JOIN student m ON d.fdegree = m.fdegree
WHERE m.fcollcode = '{$collcode}'
AND IFNULL(m.fdeleted ,'') <> 'T'
group by d.fdegree";
}else
{
$query = "SELECT DISTINCT IFNULL(d.fdegree,'') AS `key`,IFNULL(d.fdegree,'') AS `value`,
CONCAT(d.fdegree,' - ',d.fdescpn) AS label FROM degree d
INNER JOIN marks m ON d.fdegree = m.fdegree AND d.fexamno = m.fexamno
{$join}
WHERE m.fcollcode = '{$collcode}'
AND IFNULL(m.fdeleted ,'') <> 'T'
group by d.fdegree";
}
$result = $aobj_context->mobj_db->GetAll($query);
if($result){
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}else{
$data = 'Fail to load degree';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
function getMarkslistExmano($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree_ = $aobj_context->mobj_data["degree"];
$db = $aobj_context->mobj_data["db"];
if($db == 'nmamit' || $db == 'srun' || $db == 'jsstu' || $db == 'sjbit' || $db == 'rrit')
{
$query = " SELECT DISTINCT IFNULL(m.FEXAMNO,'') AS `key`,IFNULL(m.FEXAMNO,'') AS `value`,
CONCAT(m.FEXAMNO,' - ',d.fexamname) AS label FROM degree d
WHERE d.fdegree = '{$degree_}' GROUP BY d.fexamno";
}else
{
$query = " SELECT DISTINCT IFNULL(m.FEXAMNO,'') AS `key`,IFNULL(m.FEXAMNO,'') AS `value`,
CONCAT(m.FEXAMNO,' - ',d.fexamname) AS label FROM marks m INNER JOIN degree d
ON m.fexamno = d.fexamno AND m.fdegree = d.fdegree
WHERE m.fdegree = '{$degree_}' GROUP BY m.fexamno";
}
$result_sem = $aobj_context->mobj_db->GetAll($query);
if($result_sem){
echo $aobj_context->mobj_output->ToJSONEnvelope($result_sem,0,"success");
}else{
$data = 'Fail to load semester';
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"failure");
}
}
?>
|