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 : 13.59.82.60
<?php
function getstuddetforrt($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$regfrom = $aobj_context->mobj_data['regfrm'];
$regto = $aobj_context->mobj_data['regto'];
$exam = $aobj_context->mobj_data['exam'];
$degree = $aobj_context->mobj_data['degree'];
$sem = $aobj_context->mobj_data['sem'];
$type = $aobj_context->mobj_data['type'];
$splt = split("-",$exam);
$year = $splt[0];
$typ = $splt[1];
if($degree == "All"){
$con = "";
}else{
$con = "and r.fdegree = '{$degree}'";
}
if($sem == "All"){
$con1 = "";
}else{
$con1 = "and r.fexamno = '{$sem}'";
}
if($type == "All"){
$con2 = "";
}elseif($type == "P"){
$con2 = "and IFNULL(r.fnmarks,'-1') = '-1'";
}else{
$con2 = "and IFNULL(r.fnmarks,'-1') <> '-1'";
}
$query = "SELECT IFNULL(r.fregno,'') AS fregno,IFNULL(st.fname,'') AS fname,
IFNULL(sb.fsubname,'') AS fsubname,IFNULL(sb.fqpcode,'') AS fqpcode,
ifnull(r.fsubcode, '')as fsubcode,
IFNULL(r.fomarks,'')AS fomarks,IFNULL(r.fnmarks,'') AS fnmarks
FROM res_stud r
INNER JOIN student st ON r.fregno = st.fregno AND r.fdegree = st.fdegree
INNER JOIN subject sb ON r.fexamno = sb.fexamno AND r.fdegree = sb.fdegree AND sb.fcsubcode = r.fsubcode
WHERE r.fregno BETWEEN '{$regfrom}' AND '{$regto}'AND IFNULL(r.fpaymentstatus,'') = 'success'
AND FCORRTYPE = 'RT' and r.fyear = '{$year}' and fexamtype = '{$typ}'
{$con}
{$con1}
{$con2}";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success");
}
else
{
$arr['msg'] = 'No data Found..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function updatertmarks($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$exam = $aobj_context->mobj_data['exam'];
$splt = split("-",$exam);
$year = $splt[0];
$typ = $splt[1];
$req = $aobj_context->req_body;
$rtmarks = $req['rtarr'];
// var_dump($rtmarks);
// die();
foreach ($rtmarks as $key => $value) {
$query = "update res_stud set
fomarks = '{$value['fomarks']}',
fnmarks = '{$value['fnmarks']}'
where fregno = '{$value['fregno']}'
and FCORRTYPE = 'RT'
and ifnull(fackdate,'') <> ''
and fyear = '{$year}' and fexamtype = '{$typ}'
and fsubcode='{$value['fsubcode']}'";
$result = $aobj_context->pobj_db->Execute($query);
}
if($result)
{
$arr['msg'] = 'Updated Successfully...!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,0,"success");
}
else
{
$arr['msg'] = 'Failed to Update..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
}
}
function getExamDet($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$query = "select distinct concat(r.fyear,'-',r.fexamtype) as exam,d.fexamdate From res_stud r
inner join degexam d on d.fdegree = r.fdegree and r.fexamno = d.fexamno and r.fyear = d.fyear
and r.fexamtype = d.fexamtype
where r.FCORRTYPE = 'RT' and ifnull(r.fackdate,'') <> ''
order by concat(r.fyear,r.fexamtype) desc";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"Success");
}
else
{
$arr['msg'] = 'No data Found..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
}
}
function getDegrDet($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$exam = $aobj_context->mobj_data['exam'];
$splt = split("-",$exam);
$year = $splt[0];
$typ = $splt[1];
$query = "select distinct r.fdegree,d.fdescpn From res_stud r
inner join degree d on d.fdegree = r.fdegree and r.fexamno = d.fexamno
where r.FCORRTYPE = 'RT' and ifnull(r.fackdate,'') <> ''
and r.fyear = '{$year}' and r.fexamtype = '{$typ}'
order by r.fdegree";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"Success");
}
else
{
$arr['msg'] = 'No data Found..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
}
}
function getSemDet($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$univcode = $aobj_context->mobj_data['univcode'];
$exam = $aobj_context->mobj_data['exam'];
$degree = $aobj_context->mobj_data['degree'];
$splt = split("-",$exam);
$year = $splt[0];
$typ = $splt[1];
if($degree == "All"){
$con = "";
}else{
$con = "and r.fdegree = '{$degree}'";
}
$query = "select distinct r.fexamno,d.fexamname From res_stud r
inner join degree d on d.fdegree = r.fdegree and r.fexamno = d.fexamno
where r.FCORRTYPE = 'RT' and ifnull(r.fackdate,'') <> ''
and r.fyear = '{$year}' and r.fexamtype = '{$typ}'
{$con}
order by r.fdegree";
$result = $aobj_context->pobj_db->GetAll($query);
if($result)
{
echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"Success");
}
else
{
$arr['msg'] = 'No data Found..!';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
}
}
?>
|