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.119.166.141
<?php
function getDegName($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = "SELECT DISTINCT d.fdegree,d.fdescpn
FROM logisys3_ruas.degree d
INNER JOIN logisys3_ruas.tabulate t
ON d.fdegree=t.fdegree and d.fexamno = t.fexamno
union
SELECT DISTINCT d.fdegree,d.fdescpn
FROM logisys3_ruas.degree d
inner join logisys3_ruas.subject s on d.fdegree = s.fdegree and s.fexamno = d.fexamno
INNER JOIN logisys3_ruas.tdvs_tabulate t ON s.fqpcode = t.fqpcode
where ifnull(s.fqpcode,'')<> ''";
$result = $aobj_context->mobj_db->GetAll($query);
if($result)
{
$res['degcode'] = $result;
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
}
else
{
$arr['msg'] = 'No Data Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function getSemDetl($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degcode = $aobj_context->mobj_data['degcode'];
$query = "SELECT DISTINCT d.fexamno, d.fexamname,d.fdegree,d.fdescpn
FROM logisys3_ruas.degree d
WHERE d.fdegree='{$degcode}'";
// var_dump($query,"vikki");
// die();
$result = $aobj_context->mobj_db->GetAll($query);
if($result)
{
$res['sem'] = $result;
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
}
else
{
$arr['msg'] = 'No Data Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function getPushData($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$degcode = $aobj_context->mobj_data['degcode'];
$sem = $aobj_context->mobj_data['sem'];
$myear = $aobj_context->mobj_data['myear'];
$mexamtype = $aobj_context->mobj_data['mexamtype'];
$type = $aobj_context->mobj_data['type'];
if($sem === "All"){
$Cond = "1 = 1";
}else{
$Cond = " and d.fexamno='{$sem}' ";
}
if($type == 'TDVS')
{
$query = "SELECT DISTINCT d.fdegree,d.fdescpn,d.fexamno,
d.fexamname,fsubshort, count(*) as totcnt,
s.fqpcode,
t.fyear,
t.fexamtype,
sum( if(ifnull(t.fstatus,'') = '',1,0 ) ) as notpushed,
sum( if(ifnull(t.fstatus,'') = 'success',1,0 ) ) as pushed,
sum( if(ifnull(t.fstatus,'') = 'failure',1,0 ) ) as failurepush
FROM logisys3_ruas.degree d
inner join logisys3_ruas.subject s on d.fdegree = s.fdegree and d.fexamno = s.fexamno
INNER JOIN logisys3_ruas.tdvs_tabulate t ON s.fqpcode = t.fqpcode
where $Cond
and d.fdegree = '{$degcode}'
#and st.fdegree = '{$degcode}'
and t.fyear = '{$myear}'
and t.fexamtype = '{$mexamtype}'
group by d.fexamno,t.fqpcode
order by d.fdegree,d.fexamno,t.fqpcode";
// var_dump($query);
$result = $aobj_context->mobj_db->GetAll($query);
}else
{
$query = "SELECT DISTINCT d.fdegree,d.fdescpn,t.fexamno,d.fexamname,fsubshort, count(*) as totcnt,
sum( if(ifnull(t.fstatus,'') = '',1,0 ) ) as notpushed,
sum( if(ifnull(t.fstatus,'') = 'success',1,0 ) ) as pushed,
sum( if(ifnull(t.fstatus,'') = 'failure',1,0 ) ) as failurepush
FROM logisys3_ruas.degree d
INNER JOIN logisys3_ruas.tabulate t ON d.fdegree=t.fdegree
AND d.fexamno = t.fexamno
where $Cond
#d.fdegree = '{$degcode}'
group by t.fexamno,t.fsubshort
order by t.fdegree,t.fexamno,t.fsubshort";
$result = $aobj_context->mobj_db->GetAll($query);
}
if($result)
{
$res['submit'] = $result;
echo $aobj_context->mobj_output->ToJSONEnvelope($res,0,"success");
}
else
{
$arr['msg'] = 'No Data Found';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
?>
|