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.242.20
<?php
function getCategory($aobj_context){
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
$query = "select fcategory,fdescpn from category
where ifnull(fdeleted,'') <> 'T'
order by fcategory";
$result = $aobj_context->mobj_db->GetAll($query);
if(!$result && gettype($result) == 'boolean'){
$arr['msg'] = "Error while fetching data";
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"Failure");
return;
}
if(count($result) > 0) {
$arr['category'] = $result;
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 masbankdet($aobj_context)
{
$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
// $appno = $aobj_context->mobj_data["appno"];
session_start();
$mobileno = $_SESSION['MOBILE'];
$query1 = "select fappno, ifnull(fpaystatus,'') as fpaystatus, ifnull(feditapp,'F') as feditapp from entstudadm where fmobileno = '{$mobileno}'";
// var_dump($query1);
$results1 = $aobj_context->mobj_db->GetRow($query1);
if($results1['feditapp'] != 'T')
{
$query = "select count(*) as cnt from collexam where fcollcode = 'pget'
and fdegree = 'pget'
and date_format(now(),'%Y-%m-%d') between date_format(FPGADMFROM,'%Y-%m-%d')
and date_format(FPGADMTO,'%Y-%m-%d')";
$res = $aobj_context->mobj_db->GetRow($query);
if($res['cnt'] == 0)
{
$arr['msg'] = 'Last date is over';
echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure");
return;
}
}
if($results1['fpaystatus'] == 'success')
{
$data['paid'] = "success";
$data['msg'] = "Payment is received for the application. You cannot do payment again";
echo $aobj_context->mobj_output->ToJSONEnvelope($data,-1,"Faiure");
return;
}else
{
$query = "select * from masbank where ifnull(fsuspend,'') <> 'T'";
$results = $aobj_context->mobj_db->GetAll($query);
$data['masbank'] = $results;
$data['appno'] = $results1['fappno'];
echo $aobj_context->mobj_output->ToJSONEnvelope($data,0,"success");
return;
}
}
?>
|