0xV3NOMx
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.76.250


Current Path : /var/www/html/phdadm/pgetadm/
Upload File :
Current File : /var/www/html/phdadm/pgetadm/app-status.php

<?php

function getAppStatus($aobj_context) 
{
	session_start();
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);

	  $query = "select fname, fmobileno, fappno,IFNULL(fpaystatus, 'PENDING') as fpaystatus, 
	  fpaydate, IFNULL(fpayid, 'PENDING') as fpayid 
	  FROM entstudadm where fmobileno = '{$_SESSION['MOBILE']}'";

	$obj =  $aobj_context->mobj_db->GetAll($query); 

	if(count($obj) == 0) {
		$arr['msg'] = 'Application status not available.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 
		return;
	}

    $result ="";
    $result->obj1 = $obj;
    $result->obj2 = DisplayAppStatus($aobj_context);

    
	if(count($obj) > 0) {
		echo $aobj_context->mobj_output->ToJSONEnvelope($result,0,"success"); 
	}
	else {
		$arr['msg'] = 'Error in fetching Application Details.';
		echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 
	}
	return;
}

function DisplayAppStatus($aobj_context) 
{
	session_start();
	$aobj_context->mobj_db->SetFetchMode(ADODB_FETCH_ASSOC);
	$db = $aobj_context->mobj_data["db"]; 

	$query = "select fname, fmobileno, fappno, fpaystatus, fcreatedate, IFNULL(fpayid, ' ') as fpayid FROM 
	entstudadm where fmobileno = '{$_SESSION['MOBILE']}'";
     $result =  $aobj_context->mobj_db->GetAll($query);

    

     $fappno = $result[0]['fappno'];
	//  var_dump($db);

	 if($db == 'rcub'){
		$query = "select  distinct ed.fappno, ed.fdegree as degcode,ifnull(d.fprefix,'') as fprefix, CONCAT(ed.fdegree, ' - ', d.fdescpn)  as fdegree, 
		IFNULL(ed.fstatus, ' ') as fstatus ,ifnull(es.fpaystatus,'') as fpaystatus, ifnull(es.fpayid,'') as fpayid ,
		date_format(es.fpaydate, '%d/%m/%Y') as fpaydate
		FROM entoptdeg ed 
		inner join entdeg d on ed.fdegree=d.fdegree 
		inner join entstudadm es on. es.fappno = ed.fappno
		where ed.fappno='{$fappno}'";
	 }else{
		$query = "select  distinct ed.fappno, ed.fdegree as degcode,ifnull(d.fprefix,'') as fprefix,GROUP_CONCAT(CONCAT(ed.fdegree, ' - ', d.fdescpn) SEPARATOR '<br><hr>') as fdegree, 
		IFNULL(ed.fstatus, ' ') as fstatus ,ifnull(es.fpaystatus,'') as fpaystatus, ifnull(es.fpayid,'') as fpayid ,
		date_format(es.fpaydate, '%d/%m/%Y') as fpaydate
		FROM entoptdeg ed 
		inner join entdeg d on ed.fdegree=d.fdegree 
		inner join entstudadm es on. es.fappno = ed.fappno
		where ed.fappno='{$fappno}'";

	 }

	 $obj =  $aobj_context->mobj_db->GetAll($query);
      
	//   $query = "select  distinct ed.fdegree as degcode,CONCAT (ed.fdegree, ' - ', d.fdescpn) as fdegree, 
	//   IFNULL(ed.fstatus, ' ') as fstatus 
	//   FROM entoptdeg ed inner join entdeg d on ed.fdegree=d.fdegree 
	//   where ed.fappno='{$fappno}'";

	  

	
	

	if(count($obj) > 0) {

         return $obj;
		//return  $aobj_context->mobj_output->ToJSONEnvelope($obj,0,"success"); 
	}
	else {
		// $arr['msg'] = 'Error in fetching Application Status.';
		// echo $aobj_context->mobj_output->ToJSONEnvelope($arr,-1,"failure"); 
		return;
	}
	

	
	
}