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.137.181.194
Current Path : /var/www/oasis/src/ |
| Current File : /var/www/oasis/src/coporeport.php |
<?php
function loadDegreeDetails($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$collcode = $_SESSION['collcode'];
$user_type = $_SESSION['user_type'];
$user = $_SESSION['usr'];
$user_type = '40';
$cnd = "and t.fteachcode = right('{$user}',4)";
//if($user_type == '14' || $user_type == '40')
$cnd = "";
// if($element == "theory"){
// $query = "select distinct ifnull(d.FDEGREE , '') as fdegree,
// ifnull(d.FDESCPN , '') as fdescpn from degree d inner join tdvs_copomarks t
// on d.fdegree = t.fdegree and d.fexamno = t.fexamno inner join subject s
// on s.fdegree = d.fdegree and t.fsubcode = s.fcsubcode where
// t.fcollcode = '{$collcode}' and s.fretain = 'F'";
// }else if($element == "IA"){
// $query = "select distinct ifnull(d.FDEGREE , '') as fdegree,
// ifnull(d.FDESCPN , '') as fdescpn from degree d inner join tdvs_copomarks t
// on d.fdegree = t.fdegree and d.fexamno = t.fexamno inner join subject s on
// s.fdegree = d.fdegree and t.fsubcode = s.fcsubcode where t.fcollcode = '{$collcode}'
// and s.fretain = 'T'";
// }
if($user_type == '14' || $user_type == '40')
{
$qry1 = "select distinct ifnull(d.FDEGREE , '') as fdegree,
concat(d.fdegree,' - ',ifnull(d.FDESCPN , '')) as fdescpn from degree d
inner join tdvs_copomarks t on d.fdegree = t.fdegree
and t.fexamno = d.fexamno
where ifnull(d.FDEGREE , '') <> ''";
}else
{
$qry1 = "select distinct ifnull(d.FDEGREE , '') as fdegree, concat(d.fdegree,' - ',ifnull(d.FDESCPN , '')) as fdescpn from degree d
inner join subject s on d.fdegree = s.fdegree
and d.fexamno = s.fexamno
inner join tdvs_copomarks m on s.fqpcode = m.fsubcode
where ifnull(d.FDEGREE , '') <> ''
and m.fteachcode = right('{$user}',4)
group by d.fdegree";
}
$results3 = $aobj_context->mobj_db->GetAll($qry1);
echo $aobj_context->mobj_output->ToJSONEnvelope($results3,0,"success");
}
function getExamNumberDet($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$collcode = $_SESSION['collcode'];
$user_type = $_SESSION['user_type'];
$user = $_SESSION['usr'];
$user_type = 40;
$user = $_SESSION['usr'];
$cnd = "and t.fteachcode = right('{$user}',4)";
if($user_type == '14' || $user_type == '40')
$cnd = "";
$query="select distinct ifnull(d.FEXAMNO , '') as fexamno,ifnull(d.FEXAMNAME , '') as fexamname
from degree d inner join tdvs_copomarks t on d.fdegree = t.fdegree
and d.fexamno = t.fexamno
where t.FDEGREE = '{$degree}'
{$cnd}";
$results = $aobj_context->mobj_db->GetAll($query);
echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
return;
}
function getSubjectDetails1($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degree = $aobj_context->mobj_data["degree"];
$examno = $aobj_context->mobj_data["examno"];
$collcode = $_SESSION['collcode'];
$user_type = $_SESSION['user_type'];
$user_type = 40;
$user = $_SESSION['usr'];
$cnd = "and t.fteachcode = right('{$user}',4)";
if($user_type == '14' || $user_type == '40')
$cnd = "";
$query = "select distinct s.fsubcode as fqpcode, s.fsubname from subject s
inner join tdvs_copomarks m on m.fdegree = s.fdegree
and m.fexamno = s.fexamno
where m.fdegree ='{$degree}' and m.fexamno='{$examno}'
order by ifnull(ftotmarks,'') desc";
// if($element=="theory"){
// $query="select distinct ifnull(s.FQPCODE , '') as fqpcode, ifnull(s.FSUBNAME, '') as fsubname from subject s
// inner join tdvs_copomarks t on s.fqpcode = t.fsubcode
// where s.FDEGREE = '{$degree}' and s.FEXAMNO = '{$examno}'
// and ifnull(s.FQPCODE,'') <> ''
// {$cnd}";
// }else{
// $query="select distinct ifnull(s.FcsubCODE , '') as fqpcode, ifnull(s.FSUBNAME, '') as
// fsubname from subject s inner join tdvs_copomarks t on s.fdegree = t.fdegree
// and s.fexamno = t.fexamno and s.fcsubcode = t.fsubcode where t.FDEGREE = '{$degree}'
// and t.FEXAMNO = '{$examno}' and ifnull(s.FcsubCODE,'') <> '' and t.fcollcode = '{$collcode}'";
// }
$results = $aobj_context->mobj_db->GetAll($query);
echo $aobj_context->mobj_output->ToJSONEnvelope($results,0,"success");
}
?>
|