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.144.1.100
<?php
function getFees($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$fcatcode = $aobj_context->mobj_data["fcatcode"];
$fdegree = $aobj_context->mobj_data["fdegree"];
$db = $aobj_context->mobj_data["db"];
$fee = 'F';
if($db == 'rcub' && (strtoupper($fdegree) == 'MSW' || strtoupper($fdegree) == 'MLIB'))
{
$fee ='T';
}
$query = "select fheadcode,ifnull(frepfee,0) as frepfee, if('{$fee}' = 'T',ffee,fmaxfee) fmaxfee
from admfeestr
where fdegree ='PGET'
and fcatcode = '{$fcatcode}' and fcombcode = 'PGET' and fexamno = 'A'
and date_format(now(), '%Y-%m-%d') between fadmfeesdate and fadmfeeedate
order by fheadcode";
$result1 = $aobj_context->mobj_db->GetAll($query);
if(!$result1 && gettype($result1) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if(count($result1) > 0) {
$arr['feestr'] = $result1;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else {
$arr['msg'] = "No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
function validateregno($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$regno = $aobj_context->mobj_data["regno"];
$query = "select a.fdegree, b.fdescpn, a.fcollcode, concat(cl.fcollname,', ', cl.ftown)as fcollname, a.fsubcode,
a.fexamno, a.fmaxmarks, a.fsecmarks, co.funivname from control co, entvalmarks a inner join entprevdeg b
on a.fdegree = b.fdegree inner join college cl on a.fcollcode = cl.fcollcode
where fregno = '{$regno}' and fsubtype = 'T'";
$result1 = $aobj_context->mobj_db->GetAll($query);
if(count($result1) == 0) {
$arr['msg'] = "Data not found for the Reg. No.";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$fdegree = $result1[0]['fdegree'];
$fcollname = $result1[0]['fcollname'];
$funivname = $result1[0]['funivname'];
$tot_arr = array();
foreach($result1 as $k => $v) {
$tot_arr['fsubcode'] = $v['fsubcode'];
$tot_arr['f'.strtolower($v['fexamno']).'mm'] = $v['fmaxmarks'];
$tot_arr['f'.strtolower($v['fexamno']).'mo'] = $v['fsecmarks'];
}
$query = "select b.fsubcode, b.fsubname, a.fexamno, a.fmaxmarks, a.fsecmarks
from entvalmarks a inner join entprevcomb b
on 'lan' = b.fdegree and a.fsubcode = b.fnewsub
where fregno = '{$regno}' and fsubtype = 'L' order by fsubcode, fexamno";
$result1 = $aobj_context->mobj_db->GetAll($query);
$lan_arr = array();
foreach($result1 as $k => $v) {
$lan_arr[$v['fsubcode']]['fsubcode'] = $v['fsubcode'];
$lan_arr[$v['fsubcode']]['f'.strtolower($v['fexamno']).'mm'] = $v['fmaxmarks'];
$lan_arr[$v['fsubcode']]['f'.strtolower($v['fexamno']).'mo'] = $v['fsecmarks'];
}
$query = "select b.fsubcode, b.fsubname, a.fexamno, a.fmaxmarks, a.fsecmarks
from entvalmarks a inner join entprevcomb b
on a.fdegree = b.fdegree and a.fsubcode = b.fnewsub
where a.fregno = '{$regno}' and a.fsubtype = 'O' order by a.fsubcode, a.fexamno";
$result1 = $aobj_context->mobj_db->GetAll($query);
$opt_arr = array();
foreach($result1 as $k => $v) {
$opt_arr[$v['fsubcode']]['fsubcode'] = $v['fsubcode'];
$opt_arr[$v['fsubcode']]['fsubname'] = $v['fsubname'];
$opt_arr[$v['fsubcode']]['f'.strtolower($v['fexamno']).'mm'] = $v['fmaxmarks'];
$opt_arr[$v['fsubcode']]['f'.strtolower($v['fexamno']).'mo'] = $v['fsecmarks'];
}
if(!$result1 && gettype($result1) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if(count($result1) > 0) {
$query = "select ifnull(fappno,'') as fappno, ifnull(ffinsub,'F') as ffinsub,
ifnull(fpaystatus,'') as fpaystatus from entstudadm
where fmobileno = '{$_SESSION['MOBILE']}'";
// var_dump($query);
$result2 = $aobj_context->mobj_db->GetRow($query);
$fappno = $result2['fappno'];
$query = "select distinct fsubcode as int_code, fsubname as val
from entprevcomb
where fdegree = 'lan' and fcombcode = 'lan'
order by fdescpn";
$result2 = $aobj_context->mobj_db->GetAll($query);
$query = "select x.fdegree, y.fdescpn, if(ifnull(z.fdegree,'')='','','checked') as sddeg from
(select distinct b.* from entvalmarks a, enteligdeg b
where a.fdegree = b.fprevdeg and a.fsubcode = b.fnewsub
and fregno = '{$regno}'
union
select distinct b.* from entvalmarks a, enteligdeg b
where a.fdegree = b.fprevdeg and a.fsubcode = b.fsubcode
and fregno = '{$regno}') x
inner join entdeg y on x.fdegree = y.fdegree left join entoptdeg z
on x.fdegree = z.fdegree and z.fappno = '{$fappno}'
group by x.fdegree";
$result3 = $aobj_context->mobj_db->GetAll($query);
$res = array( 'tot_arr' => $tot_arr, 'lan_arr' => $lan_arr,
'opt_arr' => $opt_arr, 'lansub' => $result2, 'degree' => $fdegree,
'college' => $fcollname, 'univname' =>$funivname, 'eligdeg' => $result3,
'combcode' => 'UNIV', 'combdesc' => 'University Marks' );
$arr['vkuprevdata'] = $res;
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
return;
}
else {
$arr['msg'] = "No data found";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
}
|