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.147.52.243
Current Path : /var/www/html/pget/pgetadm/ |
| Current File : /var/www/html/pget/pgetadm/getSavedData_old_12102019.php |
<?php
function getSavedData($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
session_start();
$fappno = $aobj_context->mobj_data["fappno"];
$query = "select fappno, fmobileno, fdegree1, ifnull(fdegree2,'') as fdegree2,
ifnull(fdegree3,'') as fdegree3, ifnull(fdegree3,'') as fdegree3,
ifnull(fdegree4,'') as fdegree4, ifnull(fdegree5,'') as fdegree5,
ifnull(fdegree6,'') as fdegree6, ifnull(fname,'') as fname,
ifnull(fphotopath,'') as fphotopath, ifnull(fgender,'') as fgender,
date_format(ifnull(fdob,''), '%d/%m/%Y') as fdob, ifnull(ffatname,'') as ffatname,
ifnull(ffatocc,'') as ffatocc, ifnull(fmotname, '') as fmotname,
ifnull(fmotocc, '') as fmotocc, ifnull(fnational, '') as fnational,
ifnull(fogirl,'') as fogirl, ifnull(fcategory,'') as fcategory,
ifnull(fpmregno,'') as fpmregno, ifnull(fincome,'') as fincome,
ifnull(fbpl,'') as fbpl, ifnull(fkarstudy,'') as fkarstudy,
ifnull(faadharno,'') as faadharno, ifnull(fsslcregno,'') as fsslcregno,
ifnull(fpermadd1,'') as fpermadd1, ifnull(fpermadd2,'') as fpermadd2,
ifnull(fpermadd3,'') as fpermadd3, ifnull(fpermadd4,'') as fpermadd4,
ifnull(fpermdist,'') as fpermdist, ifnull(fpermstate,'') as fpermstate,
ifnull(fpermpin,'') as fpermpin, ifnull(fcurradd1,'') as fcurradd1,
ifnull(fcurradd2,'') as fcurradd2, ifnull(fcurradd3,'') as fcurradd3,
ifnull(fcurradd4,'') as fcurradd4, ifnull(fcurrdist,'') as fcurrdist,
ifnull(fcurrstate,'') as fcurrstate, ifnull(fcurrpin,'') as fcurrpin,
ifnull(femail,'') as femail, ifnull(fkashmir,'') as fkashmir,
ifnull(fhk,'') as fhk, ifnull(fjk,'') as fjk, ifnull(frural,'') as frural,
ifnull(fkannada,'') as fkannada, ifnull(fbcue,'') as fbcue,
ifnull(fbcuetype,'') as fbcuetype, ifnull(fsports,'') as fsports,
ifnull(fculture,'') as fculture, ifnull(fncc,'') as fncc,
ifnull(fnss,'') as fnss, ifnull(fdefence,'') as fdefence,
ifnull(fhandicap,'') as fhandicap, ifnull(fqdegree,'') as fqdegree,
ifnull(fqutype,'') as fqutype, ifnull(fquniv,'') as fquniv, ifnull(fqyear,'') as fqyear,
ifnull(fqmonth,'') as fqmonth, ifnull(fqregno,'') as fqregno,
ifnull(fqclass,'') as fqclass, ifnull(fqmaxmarks,'') as fqmaxmarks,
ifnull(fqsecmarks,'') as fqsecmarks, ifnull(fqpercentage,'') as fqpercentage,
ifnull(flang1,'') as flang1, ifnull(flang1mm,'') as flang1mm,
ifnull(flang1ms,'') as flang1ms, ifnull(flang2,'') as flang2,
ifnull(flang2mm,'') as flang2mm, ifnull(flang2ms,'') as flang2ms,
ifnull(fopt1,'') as fopt1, ifnull(fopt1mm,'') as fopt1mm,
ifnull(fopt1ms,'') as fopt1ms, ifnull(fopt2,'') as fopt2,
ifnull(fopt2mm,'') as fopt2mm, ifnull(fopt2ms,'') as fopt2ms,
ifnull(fopt3,'') as fopt3, ifnull(fopt3mm,'') as fopt3mm,
ifnull(fopt3ms,'') as fopt3ms, ifnull(fopt4,'') as fopt4,
ifnull(fopt4mm,'') as fopt4mm, ifnull(fopt4ms,'') as fopt4ms,
ifnull(fpumat,'') as fpumat, ifnull(fpubio,'') as fpubio,
ifnull(fpgdegree,'') as fpgdegree, ifnull(fpgqdegree,'') as fpgqdegree,
ifnull(fpgunivtype,'') as fpgunivtype, ifnull(fpgqclass,'') as fpgqclass,
ifnull(fpguniv,'') as fpguniv, ifnull(fpgyear,'') as fpgyear,
ifnull(fpgmonth,'') as fpgmonth, ifnull(fpgregno,'') as fpgregno,
ifnull(fpgmaxmarks,'') as fpgmaxmarks, ifnull(fpgsecmarks,'') as fpgsecmarks,
ifnull(fothexam,'') as fothexam, ifnull(fsponsor,'') as fsponsor,
ifnull(fothinfo,'') as fothinfo, ifnull(fdocattest,'') as fdocattest,
ifnull(fpaystatus,'') as fpaystatus
from pgstudadm where fappno = '{$fappno}'";
$result1 = $aobj_context->mobj_db->GetRow($query);
if(!$result1 && gettype($result1) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
$query = "";
if($result1['fpaystatus'] == 'success')
{
$query = "select fheadcode,famount from admfeedetl where fappno = '{$fappno}'
order by fheadcode";
}
else
{
$count = 0;
if($result1['fdegree1'] != '') $count = 0;
if($result1['fdegree2'] != '') $count++;
if($result1['fdegree3'] != '') $count++;
if($result1['fdegree4'] != '') $count++;
if($result1['fdegree5'] != '') $count++;
if($result1['fdegree6'] != '') $count++;
$degree = $result1['fdegree1'] == '' ? 'MCOM1' : $result1['fdegree1'];
$category = $result1['fcategory'] == '' ? 'GM' : $result1['fcategory'];
$query = "select fheadcode,
if(fheadcode= '01 ADDITIONAL COURSE FEE', fmaxfee*$count,fmaxfee ) as famount
from admfeestr where fdegree = '{$degree}'
and fcatcode = '{$category}' and fcombcode = 'PGET' and fexamno = 'A'
and date_format(now(), '%Y-%m-%d') between fadmfeesdate and fadmfeeedate
order by fheadcode";
}
$result2 = $aobj_context->mobj_db->GetAll($query);
if(count($result1) > 0) {
$arr['student'] = $result1;
$arr['feedetl'] = $result2;
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;
}
}
|